File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -899,8 +899,11 @@ def on_connect(conn):
899899 if super_ is not None :
900900 super_ (conn )
901901
902- iris = IRISNative .createIRIS (conn )
903- self .supports_vectors = iris .classMethodBoolean ("%SYSTEM.License" , "GetFeature" , 28 )
902+ if self .embedded :
903+ self .supports_vectors = conn .iris .cls ("%SYSTEM.License" ).GetFeature (28 ) == 1
904+ else :
905+ iris = IRISNative .createIRIS (conn )
906+ self .supports_vectors = iris .classMethodBoolean ("%SYSTEM.License" , "GetFeature" , 28 )
904907 if self .supports_vectors :
905908 with conn .cursor () as cursor :
906909 # Distance or similarity
Original file line number Diff line number Diff line change @@ -5,19 +5,25 @@ class IRISDialect_emb(IRISDialect):
55 driver = "emb"
66
77 embedded = True
8-
8+
99 supports_statement_cache = True
1010
1111 def _get_option (self , connection , option ):
12- return connection .iris .cls (' %SYSTEM.SQL.Util' ).GetOption (option )
12+ return connection .iris .cls (" %SYSTEM.SQL.Util" ).GetOption (option )
1313
1414 def _set_option (self , connection , option , value ):
15- return connection .iris .cls (' %SYSTEM.SQL.Util' ).SetOption (option )
15+ return connection .iris .cls (" %SYSTEM.SQL.Util" ).SetOption (option )
1616
1717 @classmethod
1818 def import_dbapi (cls ):
1919 import intersystems_iris .dbapi ._DBAPI as dbapi
20+
2021 return dbapi
2122
23+ def _get_server_version_info (self , connection ):
24+ server_version = connection ._dbapi_connection .iris .system .Version .GetNumber ()
25+ server_version = server_version .split ("." )
26+ return tuple ([int ("" .join (filter (str .isdigit , v ))) for v in server_version ])
27+
2228
2329dialect = IRISDialect_emb
You can’t perform that action at this time.
0 commit comments