Skip to content

Commit 5b52013

Browse files
committed
small fix for timestamps
1 parent 8e1100b commit 5b52013

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

requirements-iris.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.7.7/intersystems_iris-3.7.7-py3-none-any.whl
1+
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.7.8/intersystems_iris-3.7.8-py3-none-any.whl

sqlalchemy_iris/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def check_constraints(cls):
105105
"LONGVARCHAR": LONGVARCHAR,
106106
"NUMERIC": NUMERIC,
107107
"SMALLINT": SMALLINT,
108-
"TIME": TIME,
109-
"TIMESTAMP": TIMESTAMP,
108+
"TIME": IRISTime,
109+
"TIMESTAMP": IRISTimeStamp,
110110
"TINYINT": TINYINT,
111111
"VARBINARY": VARBINARY,
112112
"VARCHAR": VARCHAR,
@@ -925,8 +925,8 @@ def on_connect(conn):
925925
cursor.execute("%CHECKPRIV SELECT ON %Dictionary.PropertyDefinition")
926926
self._dictionary_access = cursor.sqlcode == 0
927927

928-
if not self.supports_vectors:
929-
util.warn("No native support for VECTOR or not activated by license")
928+
# if not self.supports_vectors:
929+
# util.warn("No native support for VECTOR or not activated by license")
930930
if not self._dictionary_access:
931931
util.warn(
932932
"""

sqlalchemy_iris/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def process(value):
5858

5959

6060
class IRISTimeStamp(sqltypes.DateTime):
61+
__visit_name__ = "timestamp"
62+
6163
def bind_processor(self, dialect):
6264
def process(value: datetime.datetime):
6365
if value is not None:
@@ -84,6 +86,8 @@ def process(value):
8486

8587

8688
class IRISDateTime(sqltypes.DateTime):
89+
__visit_name__ = "datetime"
90+
8791
def bind_processor(self, dialect):
8892
def process(value):
8993
if value is not None:
@@ -106,6 +110,8 @@ def process(value):
106110

107111

108112
class IRISTime(sqltypes.DateTime):
113+
__visit_name__ = "time"
114+
109115
def bind_processor(self, dialect):
110116
def process(value):
111117
if value is not None:

0 commit comments

Comments
 (0)