Skip to content

Commit

Permalink
small fix for timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Jul 2, 2024
1 parent 8e1100b commit 5b52013
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements-iris.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.7.7/intersystems_iris-3.7.7-py3-none-any.whl
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.7.8/intersystems_iris-3.7.8-py3-none-any.whl
8 changes: 4 additions & 4 deletions sqlalchemy_iris/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def check_constraints(cls):
"LONGVARCHAR": LONGVARCHAR,
"NUMERIC": NUMERIC,
"SMALLINT": SMALLINT,
"TIME": TIME,
"TIMESTAMP": TIMESTAMP,
"TIME": IRISTime,
"TIMESTAMP": IRISTimeStamp,
"TINYINT": TINYINT,
"VARBINARY": VARBINARY,
"VARCHAR": VARCHAR,
Expand Down Expand Up @@ -925,8 +925,8 @@ def on_connect(conn):
cursor.execute("%CHECKPRIV SELECT ON %Dictionary.PropertyDefinition")
self._dictionary_access = cursor.sqlcode == 0

if not self.supports_vectors:
util.warn("No native support for VECTOR or not activated by license")
# if not self.supports_vectors:
# util.warn("No native support for VECTOR or not activated by license")
if not self._dictionary_access:
util.warn(
"""
Expand Down
6 changes: 6 additions & 0 deletions sqlalchemy_iris/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def process(value):


class IRISTimeStamp(sqltypes.DateTime):
__visit_name__ = "timestamp"

def bind_processor(self, dialect):
def process(value: datetime.datetime):
if value is not None:
Expand All @@ -84,6 +86,8 @@ def process(value):


class IRISDateTime(sqltypes.DateTime):
__visit_name__ = "datetime"

def bind_processor(self, dialect):
def process(value):
if value is not None:
Expand All @@ -106,6 +110,8 @@ def process(value):


class IRISTime(sqltypes.DateTime):
__visit_name__ = "time"

def bind_processor(self, dialect):
def process(value):
if value is not None:
Expand Down

0 comments on commit 5b52013

Please sign in to comment.