ns-dm-sqlalchemy 0.0.0__py3-none-any.whl
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.
- ns_dm_sqlalchemy/__init__.py +42 -0
- ns_dm_sqlalchemy/_compat.py +6 -0
- ns_dm_sqlalchemy/base.py +3880 -0
- ns_dm_sqlalchemy/dmAsync.py +1484 -0
- ns_dm_sqlalchemy/dmPython.py +618 -0
- ns_dm_sqlalchemy/globalvars.py +43 -0
- ns_dm_sqlalchemy/json.py +106 -0
- ns_dm_sqlalchemy/types.py +496 -0
- ns_dm_sqlalchemy/vector.py +919 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/LICENSE +201 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/METADATA +13 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/RECORD +15 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/WHEEL +5 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/entry_points.txt +4 -0
- ns_dm_sqlalchemy-0.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from sqlalchemy.dialects import registry
|
|
2
|
+
from . import base, dmPython, types
|
|
3
|
+
from types import ModuleType
|
|
4
|
+
import sqlalchemy
|
|
5
|
+
from .base import dmsessionmaker, dmSession
|
|
6
|
+
current_version = sqlalchemy.__version__.split('b')[0].split('rc')[0].split('.post')[0].split('beta')[0]
|
|
7
|
+
|
|
8
|
+
current_ver = list(map(int, current_version.split('.')))
|
|
9
|
+
|
|
10
|
+
def get_async_info():
|
|
11
|
+
from . import dmAsync
|
|
12
|
+
dm_async = type(
|
|
13
|
+
"dm_async", (ModuleType,), {"dialect": dmAsync.dialect_async}
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
if current_ver[0] > 2 and len(current_ver) == 3:
|
|
17
|
+
get_async_info()
|
|
18
|
+
elif current_ver[0] == 2:
|
|
19
|
+
if current_ver[1] > 0:
|
|
20
|
+
get_async_info()
|
|
21
|
+
else:
|
|
22
|
+
if current_ver[2] > 22:
|
|
23
|
+
get_async_info()
|
|
24
|
+
|
|
25
|
+
base.dialect = dialect = dmPython.dialect
|
|
26
|
+
|
|
27
|
+
from .types import \
|
|
28
|
+
VARCHAR, NVARCHAR, CHAR, DATE, DATETIME, NUMBER,\
|
|
29
|
+
BLOB, BFILE, CLOB, NCLOB, TIMESTAMP, JSON,\
|
|
30
|
+
FLOAT, DOUBLE_PRECISION, LONGVARCHAR, INTERVAL,\
|
|
31
|
+
VARCHAR2, NVARCHAR2, ROWID, VECTOR, VectorAdaptor
|
|
32
|
+
from .vector import VectorWordSeek, VectorImageSeek
|
|
33
|
+
|
|
34
|
+
from .base import dialect
|
|
35
|
+
|
|
36
|
+
__all__ = (
|
|
37
|
+
'VARCHAR', 'NVARCHAR', 'CHAR', 'DATE', 'DATETIME', 'NUMBER',
|
|
38
|
+
'BLOB', 'BFILE', 'CLOB', 'NCLOB', 'TIMESTAMP', 'JSON',
|
|
39
|
+
'FLOAT', 'DOUBLE_PRECISION', 'dialect', 'INTERVAL',
|
|
40
|
+
'VARCHAR2', 'NVARCHAR2', 'ROWID', 'VECTOR', 'VectorAdaptor',
|
|
41
|
+
'VectorWordSeek', 'VectorImageSeek'
|
|
42
|
+
)
|