sqlalchemy-iris 0.16.1b1__py3-none-any.whl → 0.16.2b1__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/types.py CHANGED
@@ -56,6 +56,14 @@ class IRISDate(sqltypes.Date):
56
56
 
57
57
  return process
58
58
 
59
+ def literal_processor(self, dialect):
60
+ def process(value):
61
+ if isinstance(value, datetime.date):
62
+ return "'%s'" % value.strftime("%Y-%m-%d")
63
+ return value
64
+
65
+ return process
66
+
59
67
 
60
68
  class IRISTimeStamp(sqltypes.DateTime):
61
69
  __visit_name__ = "TIMESTAMP"
@@ -84,6 +92,14 @@ class IRISTimeStamp(sqltypes.DateTime):
84
92
 
85
93
  return process
86
94
 
95
+ def literal_processor(self, dialect):
96
+ def process(value):
97
+ if isinstance(value, datetime.datetime):
98
+ return "'%s'" % value.strftime("%Y-%m-%d %H:%M:%S.%f")
99
+ return value
100
+
101
+ return process
102
+
87
103
 
88
104
  class IRISDateTime(sqltypes.DateTime):
89
105
  __visit_name__ = "DATETIME"
@@ -108,6 +124,14 @@ class IRISDateTime(sqltypes.DateTime):
108
124
 
109
125
  return process
110
126
 
127
+ def literal_processor(self, dialect):
128
+ def process(value):
129
+ if isinstance(value, datetime.datetime):
130
+ return "'%s'" % value.strftime("%Y-%m-%d %H:%M:%S.%f")
131
+ return value
132
+
133
+ return process
134
+
111
135
 
112
136
  class IRISTime(sqltypes.DateTime):
113
137
  __visit_name__ = "TIME"
@@ -140,6 +164,14 @@ class IRISTime(sqltypes.DateTime):
140
164
 
141
165
  return process
142
166
 
167
+ def literal_processor(self, dialect):
168
+ def process(value):
169
+ if isinstance(value, datetime.time):
170
+ return "'%s'" % value.strftime("%H:%M:%S.%f")
171
+ return value
172
+
173
+ return process
174
+
143
175
 
144
176
  if sqlalchemy_version.startswith("2."):
145
177
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sqlalchemy-iris
3
- Version: 0.16.1b1
3
+ Version: 0.16.2b1
4
4
  Summary: InterSystems IRIS for SQLAlchemy
5
5
  Home-page: https://github.com/caretdev/sqlalchemy-iris
6
6
  Maintainer: CaretDev
@@ -23,6 +23,8 @@ Requires-Python: >=3.8
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: SQLAlchemy>=1.3
26
+ Provides-Extra: intersystems
27
+ Requires-Dist: intersystems-irispython==5.1.0; extra == "intersystems"
26
28
  Dynamic: requires-dist
27
29
 
28
30
  sqlalchemy-iris
@@ -40,6 +42,12 @@ will install them if they are not already in place. To install, just:
40
42
  pip install sqlalchemy-iris
41
43
  ```
42
44
 
45
+ Or to use InterSystems official driver support
46
+
47
+ ```shell
48
+ pip install sqlalchemy-iris[intersystems]
49
+ ```
50
+
43
51
  Usage
44
52
  ---
45
53
 
@@ -50,6 +58,20 @@ from sqlalchemy import create_engine
50
58
  engine = create_engine("iris://_SYSTEM:SYS@localhost:1972/USER")
51
59
  ```
52
60
 
61
+ To use with Python Embedded mode, when run next to IRIS
62
+
63
+ ```python
64
+ from sqlalchemy import create_engine
65
+ engine = create_engine("iris+emb:///USER")
66
+ ```
67
+
68
+ To use with InterSystems official driver, does not work in Python Embedded mode
69
+
70
+ ```python
71
+ from sqlalchemy import create_engine
72
+ engine = create_engine("iris+intersystems://_SYSTEM:SYS@localhost:1972/USER")
73
+ ```
74
+
53
75
  IRIS Cloud SQL requires SSLContext
54
76
 
55
77
  ```python
@@ -63,19 +63,22 @@ intersystems_iris/pex/_OutboundAdapter.py,sha256=ao2Ubbta2DcrQGdzDUD_j1Zsk8bvUfc
63
63
  intersystems_iris/pex/__init__.py,sha256=l_I1dpnluWawbFrGMDC0GLHpuHwjbpd-nho8otFX6TE,1379
64
64
  irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
65
65
  irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
66
- sqlalchemy_iris/__init__.py,sha256=2bckDQ0AJJ9DfuAc20VVQNiK-YBhpYJMdo_C0qJwPHQ,1183
66
+ sqlalchemy_iris/__init__.py,sha256=79niafYbL1XOw3eJfu0KwrHfP8CIb2I4HdN4B9PI_sQ,1297
67
67
  sqlalchemy_iris/alembic.py,sha256=L58qBIj6HwLmtU6FS5RXKW0gHr1mNTrBSChEllSh1n0,6607
68
- sqlalchemy_iris/base.py,sha256=9fnJBkWVCn1INNkbQeOLqgVyyQW95E3_siHOY2tJFJY,54463
68
+ sqlalchemy_iris/base.py,sha256=nvGT7Fu8PogLItm0CwM9Mkmxp2_GzogHw7W1KUSKAMM,54562
69
69
  sqlalchemy_iris/embedded.py,sha256=5WZ78PIYB_pPyaLrK4E7kHUsGBRiwzYHjsTDiNYHUGg,819
70
70
  sqlalchemy_iris/information_schema.py,sha256=FUL3z_viGjjOvDA71Mbk5k94dUGcLV4dW1xHxBgM1rk,6188
71
71
  sqlalchemy_iris/iris.py,sha256=Of0Ruc9W2c5ll5sjAy1xRo4tf1m0l_ab0vAdacTv3Yw,276
72
72
  sqlalchemy_iris/irisasync.py,sha256=7Kmso-RGjxQi9Y4x-zQaUk1ylDQ7TDvpvlZh_syJtGw,312
73
73
  sqlalchemy_iris/provision.py,sha256=drorbIgNO770Ws0XiCRXY_sDbQGIy2_zzNK3KYrDetY,198
74
- sqlalchemy_iris/requirements.py,sha256=Y3Znq-t7buJ_qDN3yUNcmKJl-upncUz7JJiLX1tWE7Y,8059
75
- sqlalchemy_iris/types.py,sha256=mtm5wQQuA4pE6WB4EUHzAcpdBCLfZKHrY9qOcdllc7E,11077
76
- sqlalchemy_iris-0.16.1b1.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
77
- sqlalchemy_iris-0.16.1b1.dist-info/METADATA,sha256=Y6uVMAjtCDrwK3O5-RFlb6m7fff00mlk4lEFL0WknEI,2379
78
- sqlalchemy_iris-0.16.1b1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
79
- sqlalchemy_iris-0.16.1b1.dist-info/entry_points.txt,sha256=zjOwyJPXHsNAeQP0n6l2_pav2U__rTAiS_Bk_IEmSlU,184
80
- sqlalchemy_iris-0.16.1b1.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
81
- sqlalchemy_iris-0.16.1b1.dist-info/RECORD,,
74
+ sqlalchemy_iris/requirements.py,sha256=Xxk8eGmXHUQoz3a8Hg8UxebJ-bdJYhCazrcaJTgWzOE,44393
75
+ sqlalchemy_iris/types.py,sha256=M5uyeANVN6MU40kiWBePGTCnVaAAKmfLOHq7zuJ0z6A,12024
76
+ sqlalchemy_iris/intersystems/__init__.py,sha256=qy4J2zWwgwCJZMs0pWvPlOFUBB2HdzsscBWYVxEp4pY,5363
77
+ sqlalchemy_iris/intersystems/cursor.py,sha256=I6hICJqlpomXpvE3fx0JWQwTlD6-GQi9cHxa4PAzGZM,464
78
+ sqlalchemy_iris/intersystems/dbapi.py,sha256=WnYqIvS9zfz5Dmc9Vt3Ql9CRyIWt0x7Wa1rm_4yLVVA,820
79
+ sqlalchemy_iris-0.16.2b1.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
80
+ sqlalchemy_iris-0.16.2b1.dist-info/METADATA,sha256=rSddPeKRGBcnp5I4GpbYpQgAA0tDlP0UnUAfiRyQiLk,2946
81
+ sqlalchemy_iris-0.16.2b1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
82
+ sqlalchemy_iris-0.16.2b1.dist-info/entry_points.txt,sha256=sYU1YvyyeGqOVVMpHySThfEhrVQL1lUVz5rDwmwCj7E,258
83
+ sqlalchemy_iris-0.16.2b1.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
84
+ sqlalchemy_iris-0.16.2b1.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  [sqlalchemy.dialects]
2
2
  iris = sqlalchemy_iris.iris:IRISDialect_iris
3
3
  iris.emb = sqlalchemy_iris.embedded:IRISDialect_emb
4
+ iris.intersystems = sqlalchemy_iris.intersystems:IRISDialect_intersystems
4
5
  iris.irisasync = sqlalchemy_iris.irisasync:IRISDialect_irisasync