sqlalchemy-iris 0.13.3b1__py3-none-any.whl → 0.13.4b2__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.
- sqlalchemy_iris/__init__.py +1 -0
- sqlalchemy_iris/base.py +25 -9
- sqlalchemy_iris/irisasync.py +17 -0
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/METADATA +1 -1
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/RECORD +9 -8
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/entry_points.txt +1 -0
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/LICENSE +0 -0
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/WHEEL +0 -0
- {sqlalchemy_iris-0.13.3b1.dist-info → sqlalchemy_iris-0.13.4b2.dist-info}/top_level.txt +0 -0
sqlalchemy_iris/__init__.py
CHANGED
@@ -31,6 +31,7 @@ base.dialect = dialect = iris.dialect
|
|
31
31
|
|
32
32
|
_registry.register("iris.iris", "sqlalchemy_iris.iris", "IRISDialect_iris")
|
33
33
|
_registry.register("iris.emb", "sqlalchemy_iris.embedded", "IRISDialect_emb")
|
34
|
+
_registry.register("iris.irisasync", "sqlalchemy_iris.irisasync", "IRISDialect_irisasync")
|
34
35
|
|
35
36
|
__all__ = [
|
36
37
|
"BIGINT",
|
sqlalchemy_iris/base.py
CHANGED
@@ -742,6 +742,12 @@ class IRISTypeCompiler(compiler.GenericTypeCompiler):
|
|
742
742
|
def visit_BIT(self, type_, **kw):
|
743
743
|
return "BIT"
|
744
744
|
|
745
|
+
def visit_VARCHAR(self, type_, **kw):
|
746
|
+
# If length is not specified, use 50 as default in IRIS
|
747
|
+
if type_.length is None:
|
748
|
+
type_ = VARCHAR(50)
|
749
|
+
return "VARCHAR(%d)" % type_.length
|
750
|
+
|
745
751
|
def visit_TEXT(self, type_, **kw):
|
746
752
|
return "VARCHAR(65535)"
|
747
753
|
|
@@ -878,8 +884,12 @@ class IRISDialect(default.DefaultDialect):
|
|
878
884
|
|
879
885
|
def _get_server_version_info(self, connection):
|
880
886
|
server_version = connection.connection._connection_info._server_version
|
881
|
-
server_version =
|
882
|
-
|
887
|
+
server_version = (
|
888
|
+
server_version[server_version.find("Version") + 8 :]
|
889
|
+
.split(" ")[0]
|
890
|
+
.split(".")
|
891
|
+
)
|
892
|
+
return tuple([int("".join(filter(str.isdigit, v))) for v in server_version])
|
883
893
|
|
884
894
|
_isolation_lookup = set(
|
885
895
|
[
|
@@ -900,17 +910,23 @@ class IRISDialect(default.DefaultDialect):
|
|
900
910
|
super_(conn)
|
901
911
|
|
902
912
|
if self.embedded:
|
903
|
-
self.supports_vectors =
|
913
|
+
self.supports_vectors = (
|
914
|
+
conn.iris.cls("%SYSTEM.License").GetFeature(28) == 1
|
915
|
+
)
|
904
916
|
else:
|
905
917
|
try:
|
906
918
|
iris = IRISNative.createIRIS(conn)
|
907
|
-
self.supports_vectors = iris.classMethodBoolean(
|
908
|
-
|
919
|
+
self.supports_vectors = iris.classMethodBoolean(
|
920
|
+
"%SYSTEM.License", "GetFeature", 28
|
921
|
+
)
|
922
|
+
except: # noqa
|
909
923
|
self.supports_vectors = False
|
910
924
|
if self.supports_vectors:
|
911
925
|
with conn.cursor() as cursor:
|
912
926
|
# Distance or similarity
|
913
|
-
cursor.execute(
|
927
|
+
cursor.execute(
|
928
|
+
"select vector_cosine(to_vector('1'), to_vector('1'))"
|
929
|
+
)
|
914
930
|
self.vector_cosine_similarity = cursor.fetchone()[0] == 0
|
915
931
|
|
916
932
|
self._dictionary_access = False
|
@@ -1505,9 +1521,9 @@ There are no access to %Dictionary, may be required for some advanced features,
|
|
1505
1521
|
table_fkey[rfknm] = fkey = {
|
1506
1522
|
"name": rfknm,
|
1507
1523
|
"constrained_columns": [],
|
1508
|
-
"referred_schema":
|
1509
|
-
|
1510
|
-
|
1524
|
+
"referred_schema": (
|
1525
|
+
rschema if rschema != self.default_schema_name else None
|
1526
|
+
),
|
1511
1527
|
"referred_table": rtbl,
|
1512
1528
|
"referred_columns": [],
|
1513
1529
|
"options": {},
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from .base import IRISDialect
|
2
|
+
|
3
|
+
|
4
|
+
class IRISDialect_irisasync(IRISDialect):
|
5
|
+
driver = "irisasync"
|
6
|
+
|
7
|
+
is_async = True
|
8
|
+
supports_statement_cache = True
|
9
|
+
|
10
|
+
@classmethod
|
11
|
+
def import_dbapi(cls):
|
12
|
+
import intersystems_iris.dbapi._DBAPI as dbapi
|
13
|
+
|
14
|
+
return dbapi
|
15
|
+
|
16
|
+
|
17
|
+
dialect = IRISDialect_irisasync
|
@@ -67,18 +67,19 @@ iris/iris_ipm.py,sha256=Q0jcNItjywlqOPZr0hgdTFSeLPNEmB-tcICOI_cXnaY,790
|
|
67
67
|
iris/iris_ipm.pyi,sha256=j7CNUZcjeDu5sgeWUZJO_Qi4vQmHh6aD-jPWv8OdoUs,374
|
68
68
|
irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
|
69
69
|
irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
|
70
|
-
sqlalchemy_iris/__init__.py,sha256=
|
70
|
+
sqlalchemy_iris/__init__.py,sha256=2bckDQ0AJJ9DfuAc20VVQNiK-YBhpYJMdo_C0qJwPHQ,1183
|
71
71
|
sqlalchemy_iris/alembic.py,sha256=IhZP6P-whMrXzD8lTCKvIC6EK8hKW88JTNG_U8t2quk,6373
|
72
|
-
sqlalchemy_iris/base.py,sha256=
|
72
|
+
sqlalchemy_iris/base.py,sha256=rHhPGdyh634LvVfF1fC2ptCn3ze0gzI0TMrzUOzxMGw,52334
|
73
73
|
sqlalchemy_iris/embedded.py,sha256=5WZ78PIYB_pPyaLrK4E7kHUsGBRiwzYHjsTDiNYHUGg,819
|
74
74
|
sqlalchemy_iris/information_schema.py,sha256=Ei1gAHXn4fWpvmUzwf-2hGslU458uQXFt1s0r1NAj2Y,6132
|
75
75
|
sqlalchemy_iris/iris.py,sha256=Of0Ruc9W2c5ll5sjAy1xRo4tf1m0l_ab0vAdacTv3Yw,276
|
76
|
+
sqlalchemy_iris/irisasync.py,sha256=7Kmso-RGjxQi9Y4x-zQaUk1ylDQ7TDvpvlZh_syJtGw,312
|
76
77
|
sqlalchemy_iris/provision.py,sha256=drorbIgNO770Ws0XiCRXY_sDbQGIy2_zzNK3KYrDetY,198
|
77
78
|
sqlalchemy_iris/requirements.py,sha256=2MPADPOk3qvXCyr7xXvkl_MfkE8v75Z3yGJO0RbzRog,7560
|
78
79
|
sqlalchemy_iris/types.py,sha256=LXqinhEgJXMeBvQ70_lTntK0QROXfTapRdKmaic3aMc,10626
|
79
|
-
sqlalchemy_iris-0.13.
|
80
|
-
sqlalchemy_iris-0.13.
|
81
|
-
sqlalchemy_iris-0.13.
|
82
|
-
sqlalchemy_iris-0.13.
|
83
|
-
sqlalchemy_iris-0.13.
|
84
|
-
sqlalchemy_iris-0.13.
|
80
|
+
sqlalchemy_iris-0.13.4b2.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
|
81
|
+
sqlalchemy_iris-0.13.4b2.dist-info/METADATA,sha256=ms4uwAbLbGs7IUtKYhXgGRXFCuyZtOxdmqwN5VCIrVg,2357
|
82
|
+
sqlalchemy_iris-0.13.4b2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
83
|
+
sqlalchemy_iris-0.13.4b2.dist-info/entry_points.txt,sha256=zjOwyJPXHsNAeQP0n6l2_pav2U__rTAiS_Bk_IEmSlU,184
|
84
|
+
sqlalchemy_iris-0.13.4b2.dist-info/top_level.txt,sha256=mjpHqFjekbB1TWr3xI3o4AqN3Spby-_uqyuSSeBDmuw,50
|
85
|
+
sqlalchemy_iris-0.13.4b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|