tpt-builder 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tpt_builder-0.0.8/.github/workflows/python-publish.yml +39 -0
- tpt_builder-0.0.8/.gitignore +162 -0
- tpt_builder-0.0.8/.vscode/launch.json +15 -0
- tpt_builder-0.0.8/.vscode/settings.json +6 -0
- tpt_builder-0.0.8/LICENSE.txt +15 -0
- tpt_builder-0.0.8/PKG-INFO +43 -0
- tpt_builder-0.0.8/README.md +21 -0
- tpt_builder-0.0.8/pyproject.toml +64 -0
- tpt_builder-0.0.8/src/tpt_script_generator/__about__.py +4 -0
- tpt_builder-0.0.8/src/tpt_script_generator/__init__.py +9 -0
- tpt_builder-0.0.8/src/tpt_script_generator/base_operator.py +37 -0
- tpt_builder-0.0.8/src/tpt_script_generator/cmd.py +0 -0
- tpt_builder-0.0.8/src/tpt_script_generator/ddl_operator.py +115 -0
- tpt_builder-0.0.8/src/tpt_script_generator/enums/__init__.py +9 -0
- tpt_builder-0.0.8/src/tpt_script_generator/enums/ddl_operator.py +28 -0
- tpt_builder-0.0.8/src/tpt_script_generator/enums/load_operator.py +98 -0
- tpt_builder-0.0.8/src/tpt_script_generator/enums/update_operator.py +70 -0
- tpt_builder-0.0.8/src/tpt_script_generator/load_operator.py +202 -0
- tpt_builder-0.0.8/src/tpt_script_generator/schema.py +23 -0
- tpt_builder-0.0.8/src/tpt_script_generator/script.py +58 -0
- tpt_builder-0.0.8/src/tpt_script_generator/step.py +15 -0
- tpt_builder-0.0.8/src/tpt_script_generator/template.py +0 -0
- tpt_builder-0.0.8/src/tpt_script_generator/update_operator.py +201 -0
- tpt_builder-0.0.8/tests/__init__.py +3 -0
- tpt_builder-0.0.8/tests/test_ddl_script.py +116 -0
- tpt_builder-0.0.8/tests/test_load_operator.py +190 -0
- tpt_builder-0.0.8/tests/test_update_script.py +177 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
deploy:
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v3
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.x'
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install build
|
|
33
|
+
- name: Build package
|
|
34
|
+
run: python -m build
|
|
35
|
+
- name: Publish package
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
|
37
|
+
with:
|
|
38
|
+
user: __token__
|
|
39
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
110
|
+
.pdm.toml
|
|
111
|
+
.pdm-python
|
|
112
|
+
.pdm-build/
|
|
113
|
+
|
|
114
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
115
|
+
__pypackages__/
|
|
116
|
+
|
|
117
|
+
# Celery stuff
|
|
118
|
+
celerybeat-schedule
|
|
119
|
+
celerybeat.pid
|
|
120
|
+
|
|
121
|
+
# SageMath parsed files
|
|
122
|
+
*.sage.py
|
|
123
|
+
|
|
124
|
+
# Environments
|
|
125
|
+
.env
|
|
126
|
+
.venv
|
|
127
|
+
env/
|
|
128
|
+
venv/
|
|
129
|
+
ENV/
|
|
130
|
+
env.bak/
|
|
131
|
+
venv.bak/
|
|
132
|
+
|
|
133
|
+
# Spyder project settings
|
|
134
|
+
.spyderproject
|
|
135
|
+
.spyproject
|
|
136
|
+
|
|
137
|
+
# Rope project settings
|
|
138
|
+
.ropeproject
|
|
139
|
+
|
|
140
|
+
# mkdocs documentation
|
|
141
|
+
/site
|
|
142
|
+
|
|
143
|
+
# mypy
|
|
144
|
+
.mypy_cache/
|
|
145
|
+
.dmypy.json
|
|
146
|
+
dmypy.json
|
|
147
|
+
|
|
148
|
+
# Pyre type checker
|
|
149
|
+
.pyre/
|
|
150
|
+
|
|
151
|
+
# pytype static type analyzer
|
|
152
|
+
.pytype/
|
|
153
|
+
|
|
154
|
+
# Cython debug symbols
|
|
155
|
+
cython_debug/
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
#.idea/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Python Debugger: Current File",
|
|
9
|
+
"type": "debugpy",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"program": "${file}",
|
|
12
|
+
"console": "integratedTerminal"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present U.N. Owen <void@some.where>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
python3 -m pip install --upgrade build twine
|
|
13
|
+
python3 -m build
|
|
14
|
+
python3 -m twine upload --repository pypi dist/*
|
|
15
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tpt-builder
|
|
3
|
+
Version: 0.0.8
|
|
4
|
+
Summary: A python pacakge for Teradata PT script builder
|
|
5
|
+
Project-URL: Documentation, https://github.com/rhasanm/tpt-script-generator#readme
|
|
6
|
+
Project-URL: Issues, https://github.com/rhasanm/tpt-script-generator/issues
|
|
7
|
+
Project-URL: Source, https://github.com/rhasanm/tpt-script-generator
|
|
8
|
+
Author-email: Pesnik <sohandoabernahin1@gmail.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE.txt
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# tpt-script-generator
|
|
24
|
+
|
|
25
|
+
[](https://pypi.org/project/tpt-script-generator)
|
|
26
|
+
[](https://pypi.org/project/tpt-script-generator)
|
|
27
|
+
|
|
28
|
+
-----
|
|
29
|
+
|
|
30
|
+
## Table of Contents
|
|
31
|
+
|
|
32
|
+
- [Installation](#installation)
|
|
33
|
+
- [License](#license)
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```console
|
|
38
|
+
pip install tpt-script-generator
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
`tpt-script-generator` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# tpt-script-generator
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/tpt-script-generator)
|
|
4
|
+
[](https://pypi.org/project/tpt-script-generator)
|
|
5
|
+
|
|
6
|
+
-----
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [License](#license)
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```console
|
|
16
|
+
pip install tpt-script-generator
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
`tpt-script-generator` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tpt-builder"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = 'A python pacakge for Teradata PT script builder'
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
keywords = []
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Pesnik", email = "sohandoabernahin1@gmail.com" },
|
|
15
|
+
]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Programming Language :: Python",
|
|
19
|
+
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
25
|
+
"Programming Language :: Python :: Implementation :: PyPy",
|
|
26
|
+
]
|
|
27
|
+
dependencies = []
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Documentation = "https://github.com/rhasanm/tpt-script-generator#readme"
|
|
31
|
+
Issues = "https://github.com/rhasanm/tpt-script-generator/issues"
|
|
32
|
+
Source = "https://github.com/rhasanm/tpt-script-generator"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.version]
|
|
35
|
+
path = "src/tpt_script_generator/__about__.py"
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.wheel]
|
|
38
|
+
packages = ["src/tpt_script_generator"]
|
|
39
|
+
|
|
40
|
+
[tool.hatch.envs.types]
|
|
41
|
+
extra-dependencies = [
|
|
42
|
+
"mypy>=1.0.0",
|
|
43
|
+
]
|
|
44
|
+
[tool.hatch.envs.types.scripts]
|
|
45
|
+
check = "mypy --install-types --non-interactive {args:src/tpt_script_generator tests}"
|
|
46
|
+
|
|
47
|
+
[tool.coverage.run]
|
|
48
|
+
source_pkgs = ["tpt_script_generator", "tests"]
|
|
49
|
+
branch = true
|
|
50
|
+
parallel = true
|
|
51
|
+
omit = [
|
|
52
|
+
"src/tpt_script_generator/__about__.py",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[tool.coverage.paths]
|
|
56
|
+
tpt_script_generator = ["src/tpt_script_generator", "*/tpt-script-generator/src/tpt_script_generator"]
|
|
57
|
+
tests = ["tests", "*/tpt-script-generator/tests"]
|
|
58
|
+
|
|
59
|
+
[tool.coverage.report]
|
|
60
|
+
exclude_lines = [
|
|
61
|
+
"no cov",
|
|
62
|
+
"if __name__ == .__main__.:",
|
|
63
|
+
"if TYPE_CHECKING:",
|
|
64
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024-present U.N. Owen <void@some.where>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
from tpt_script_generator.ddl_operator import DDLOperator
|
|
6
|
+
from tpt_script_generator.update_operator import UpdateOperator
|
|
7
|
+
from tpt_script_generator.script import TPTScript
|
|
8
|
+
from tpt_script_generator.step import Step
|
|
9
|
+
from tpt_script_generator.load_operator import LoadOperator
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
from tpt_script_generator.enums import AttributeType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Operator(ABC):
|
|
6
|
+
def __init__(self, operator_name, operator_type):
|
|
7
|
+
self.operator_name = operator_name
|
|
8
|
+
self.operator_type = operator_type
|
|
9
|
+
self.schema_name = ""
|
|
10
|
+
self.attributes = {}
|
|
11
|
+
|
|
12
|
+
def with_schema(self, schema_name):
|
|
13
|
+
self.schema_name = schema_name
|
|
14
|
+
return self
|
|
15
|
+
|
|
16
|
+
def with_attribute(self, attr_type: AttributeType, attr_key, attr_value):
|
|
17
|
+
self.attributes[attr_key] = (attr_type.value, attr_value)
|
|
18
|
+
return self
|
|
19
|
+
|
|
20
|
+
def build(self):
|
|
21
|
+
definition = f" DEFINE OPERATOR {self.operator_name}\n"
|
|
22
|
+
definition += f" TYPE {self.operator_type}\n"
|
|
23
|
+
if self.schema_name:
|
|
24
|
+
definition += f" SCHEMA {self.schema_name}\n"
|
|
25
|
+
if self.attributes:
|
|
26
|
+
definition += " ATTRIBUTES\n (\n"
|
|
27
|
+
for attr_key, (attr_type, attr_value) in self.attributes.items():
|
|
28
|
+
if attr_type != AttributeType.VARCHAR.value or attr_value.startswith(
|
|
29
|
+
"@"
|
|
30
|
+
):
|
|
31
|
+
definition += f" {attr_type} {attr_key} = {attr_value},\n"
|
|
32
|
+
else:
|
|
33
|
+
definition += f" {attr_type} {attr_key} = '{attr_value}',\n"
|
|
34
|
+
|
|
35
|
+
definition = definition.rstrip(",\n")
|
|
36
|
+
definition += "\n );\n"
|
|
37
|
+
return definition
|
|
File without changes
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
from tpt_script_generator.base_operator import Operator
|
|
2
|
+
from tpt_script_generator.enums import AttributeType
|
|
3
|
+
from tpt_script_generator.enums.ddl_operator import (
|
|
4
|
+
DataEncryptionOption,
|
|
5
|
+
LogSQLOption,
|
|
6
|
+
RestartAtFirstDMLGroupOption,
|
|
7
|
+
TraceLevelOption,
|
|
8
|
+
TreatDBSRestartAsFatalOption,
|
|
9
|
+
UnicodePassThroughOption,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DDLOperator(Operator):
|
|
14
|
+
def __init__(self):
|
|
15
|
+
super().__init__("DDLOperator", "DDL")
|
|
16
|
+
|
|
17
|
+
def with_account_id(self, account_id):
|
|
18
|
+
self.with_attribute(AttributeType.VARCHAR, "AccountId", account_id)
|
|
19
|
+
return self
|
|
20
|
+
|
|
21
|
+
def with_connect_string(self, connect_string):
|
|
22
|
+
self.with_attribute(AttributeType.VARCHAR, "ConnectString", connect_string)
|
|
23
|
+
return self
|
|
24
|
+
|
|
25
|
+
def with_data_encryption(self, option: DataEncryptionOption):
|
|
26
|
+
self.with_attribute(AttributeType.VARCHAR, "DataEncryption", option.value)
|
|
27
|
+
return self
|
|
28
|
+
|
|
29
|
+
def with_error_list(self, error_list):
|
|
30
|
+
self.with_attribute(AttributeType.VARCHAR, "ErrorList", error_list)
|
|
31
|
+
return self
|
|
32
|
+
|
|
33
|
+
def with_logon_mech(self, logon_mech):
|
|
34
|
+
self.with_attribute(AttributeType.VARCHAR, "LogonMech", logon_mech)
|
|
35
|
+
return self
|
|
36
|
+
|
|
37
|
+
def with_logon_mech_data(self, logon_mech_data):
|
|
38
|
+
self.with_attribute(AttributeType.VARCHAR, "LogonMechData", logon_mech_data)
|
|
39
|
+
return self
|
|
40
|
+
|
|
41
|
+
def with_log_sql(self, log_sql: LogSQLOption):
|
|
42
|
+
self.with_attribute(AttributeType.VARCHAR, "LogSQL", log_sql.value)
|
|
43
|
+
return self
|
|
44
|
+
|
|
45
|
+
def with_private_log_name(self, private_log_name):
|
|
46
|
+
self.with_attribute(AttributeType.VARCHAR, "PrivateLogName", private_log_name)
|
|
47
|
+
return self
|
|
48
|
+
|
|
49
|
+
def with_query_band_sess_info(self, query_band_sess_info):
|
|
50
|
+
self.with_attribute(
|
|
51
|
+
AttributeType.VARCHAR, "QueryBandSessInfo", query_band_sess_info
|
|
52
|
+
)
|
|
53
|
+
return self
|
|
54
|
+
|
|
55
|
+
def with_replication_override(self, option: TreatDBSRestartAsFatalOption):
|
|
56
|
+
self.with_attribute(AttributeType.VARCHAR, "ReplicationOverride", option.value)
|
|
57
|
+
return self
|
|
58
|
+
|
|
59
|
+
def with_restart_at_first_dml_group(self, option: RestartAtFirstDMLGroupOption):
|
|
60
|
+
self.with_attribute(
|
|
61
|
+
AttributeType.VARCHAR, "RestartAtFirstDMLGroup", option.value
|
|
62
|
+
)
|
|
63
|
+
return self
|
|
64
|
+
|
|
65
|
+
def with_role_name(self, role_name):
|
|
66
|
+
self.with_attribute(AttributeType.VARCHAR, "RoleName", role_name)
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
def with_splopt(self, option: UnicodePassThroughOption):
|
|
70
|
+
self.with_attribute(AttributeType.VARCHAR, "SPLOPT", option.value)
|
|
71
|
+
return self
|
|
72
|
+
|
|
73
|
+
def with_sql_cmd_file_name(self, sql_cmd_file_name):
|
|
74
|
+
self.with_attribute(AttributeType.VARCHAR, "SQLCmdFileName", sql_cmd_file_name)
|
|
75
|
+
return self
|
|
76
|
+
|
|
77
|
+
def with_tdp_id(self, tdp_id):
|
|
78
|
+
self.with_attribute(AttributeType.VARCHAR, "TdpId", tdp_id)
|
|
79
|
+
return self
|
|
80
|
+
|
|
81
|
+
def with_time_zone_sess_info(self, time_zone_sess_info):
|
|
82
|
+
self.with_attribute(
|
|
83
|
+
AttributeType.VARCHAR, "TimeZoneSessInfo", time_zone_sess_info
|
|
84
|
+
)
|
|
85
|
+
return self
|
|
86
|
+
|
|
87
|
+
def with_trace_level(self, trace_level: TraceLevelOption):
|
|
88
|
+
self.with_attribute(AttributeType.VARCHAR, "TraceLevel", trace_level.value)
|
|
89
|
+
return self
|
|
90
|
+
|
|
91
|
+
def with_transform_group(self, transform_group):
|
|
92
|
+
self.with_attribute(AttributeType.VARCHAR, "TransformGroup", transform_group)
|
|
93
|
+
return self
|
|
94
|
+
|
|
95
|
+
def with_treat_dbs_restart_as_fatal(self, option: TreatDBSRestartAsFatalOption):
|
|
96
|
+
self.with_attribute(
|
|
97
|
+
AttributeType.VARCHAR, "TreatDBSRestartAsFatal", option.value
|
|
98
|
+
)
|
|
99
|
+
return self
|
|
100
|
+
|
|
101
|
+
def with_unicode_pass_through(self, option: UnicodePassThroughOption):
|
|
102
|
+
self.with_attribute(AttributeType.VARCHAR, "UnicodePassThrough", option.value)
|
|
103
|
+
return self
|
|
104
|
+
|
|
105
|
+
def with_username(self, username):
|
|
106
|
+
self.with_attribute(AttributeType.VARCHAR, "Username", username)
|
|
107
|
+
return self
|
|
108
|
+
|
|
109
|
+
def with_user_password(self, user_password):
|
|
110
|
+
self.with_attribute(AttributeType.VARCHAR, "UserPassword", user_password)
|
|
111
|
+
return self
|
|
112
|
+
|
|
113
|
+
def with_working_database(self, working_database):
|
|
114
|
+
self.with_attribute(AttributeType.VARCHAR, "WorkingDatabase", working_database)
|
|
115
|
+
return self
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
class DataEncryptionOption(Enum):
|
|
4
|
+
ON = "ON"
|
|
5
|
+
OFF = "OFF"
|
|
6
|
+
|
|
7
|
+
class LogSQLOption(Enum):
|
|
8
|
+
YES = "Yes"
|
|
9
|
+
NO = "No"
|
|
10
|
+
|
|
11
|
+
class TraceLevelOption(Enum):
|
|
12
|
+
NONE = "None"
|
|
13
|
+
CLI = "CLI"
|
|
14
|
+
PX = "PX"
|
|
15
|
+
OPER = "OPER"
|
|
16
|
+
ALL = "All"
|
|
17
|
+
|
|
18
|
+
class TreatDBSRestartAsFatalOption(Enum):
|
|
19
|
+
YES = "Yes"
|
|
20
|
+
NO = "No"
|
|
21
|
+
|
|
22
|
+
class UnicodePassThroughOption(Enum):
|
|
23
|
+
ON = "On"
|
|
24
|
+
OFF = "Off"
|
|
25
|
+
|
|
26
|
+
class RestartAtFirstDMLGroupOption(Enum):
|
|
27
|
+
YES = "Yes"
|
|
28
|
+
NO = "No"
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BufferSizeUnit(Enum):
|
|
5
|
+
KB = "KBytes"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CheckpointRowCount(Enum):
|
|
9
|
+
NO = "No"
|
|
10
|
+
YES = "Yes"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DataEncryption(Enum):
|
|
14
|
+
ON = "On"
|
|
15
|
+
OFF = "Off"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DateForm(Enum):
|
|
19
|
+
INTEGER_DATE = "integerDate"
|
|
20
|
+
ANSI_DATE = "ansiDate"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DropErrorTable(Enum):
|
|
24
|
+
YES = "Yes"
|
|
25
|
+
NO = "No"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DropLogTable(Enum):
|
|
29
|
+
YES = "Yes"
|
|
30
|
+
NO = "No"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class LogSQL(Enum):
|
|
34
|
+
YES = "Yes"
|
|
35
|
+
NO = "No"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class NotifyExitIsDLL(Enum):
|
|
39
|
+
YES = "Yes"
|
|
40
|
+
NO = "No"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class NotifyLevel(Enum):
|
|
44
|
+
OFF = "Off"
|
|
45
|
+
LOW = "Low"
|
|
46
|
+
MED = "Med"
|
|
47
|
+
HIGH = "High"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class NotifyMethod(Enum):
|
|
51
|
+
NONE = "None"
|
|
52
|
+
MSG = "Msg"
|
|
53
|
+
EXIT = "Exit"
|
|
54
|
+
EXIT64 = "Exit64"
|
|
55
|
+
EXITEON = "ExitEON"
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class PauseAcq(Enum):
|
|
59
|
+
NO = "No"
|
|
60
|
+
YES = "Yes"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class TASMFASTFAIL(Enum):
|
|
64
|
+
YES = "Yes"
|
|
65
|
+
NO = "No"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class TreatDBSRestartAsFatal(Enum):
|
|
69
|
+
NO = "No"
|
|
70
|
+
YES = "Yes"
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class UnicodePassThrough(Enum):
|
|
74
|
+
ON = "On"
|
|
75
|
+
OFF = "Off"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class WildcardInsert(Enum):
|
|
79
|
+
YES = "Yes"
|
|
80
|
+
NO = "No"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class TraceLevelOption(Enum):
|
|
84
|
+
NONE = "None"
|
|
85
|
+
CLI = "CLI"
|
|
86
|
+
PX = "PX"
|
|
87
|
+
OPER = "OPER"
|
|
88
|
+
ALL = "All"
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class DataEncryptionOption(Enum):
|
|
92
|
+
ON = "On"
|
|
93
|
+
OFF = "Off"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class LogSQLOption(Enum):
|
|
97
|
+
YES = "Yes"
|
|
98
|
+
NO = "No"
|