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):
899
899
if super_ is not None :
900
900
super_ (conn )
901
901
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 )
904
907
if self .supports_vectors :
905
908
with conn .cursor () as cursor :
906
909
# Distance or similarity
Original file line number Diff line number Diff line change @@ -5,19 +5,25 @@ class IRISDialect_emb(IRISDialect):
5
5
driver = "emb"
6
6
7
7
embedded = True
8
-
8
+
9
9
supports_statement_cache = True
10
10
11
11
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 )
13
13
14
14
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 )
16
16
17
17
@classmethod
18
18
def import_dbapi (cls ):
19
19
import intersystems_iris .dbapi ._DBAPI as dbapi
20
+
20
21
return dbapi
21
22
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
+
22
28
23
29
dialect = IRISDialect_emb
You can’t perform that action at this time.
0 commit comments