@@ -270,6 +270,7 @@ cdef class ThickConnImpl(BaseConnImpl):
270270 dpiConnCreateParams conn_params
271271 ConnectParamsImpl pool_params
272272 dpiAccessToken access_token
273+ dpiVersionInfo version_info
273274 ConnectionParams params
274275 int status
275276
@@ -387,8 +388,20 @@ cdef class ThickConnImpl(BaseConnImpl):
387388 params.password_len, params.dsn_ptr,
388389 params.dsn_len, & common_params,
389390 & conn_params, & self ._handle)
391+ if status == DPI_SUCCESS:
392+ status = dpiConn_getServerVersion(self ._handle, NULL , NULL ,
393+ & version_info)
390394 if status < 0 :
391395 _raise_from_odpi()
396+ self .server_version = (
397+ version_info.versionNum,
398+ version_info.releaseNum,
399+ version_info.updateNum,
400+ version_info.portReleaseNum,
401+ version_info.portUpdateNum
402+ )
403+ self .supports_bool = client_version_info.versionNum >= 23 \
404+ and version_info.versionNum >= 23
392405
393406 # determine if session callback should be invoked; this takes place if
394407 # the connection is newly created by the pool or if the requested tag
@@ -581,20 +594,6 @@ cdef class ThickConnImpl(BaseConnImpl):
581594 finally :
582595 dpiObjectType_release(handle)
583596
584- def get_version (self ):
585- cdef:
586- dpiVersionInfo version_info
587- int status
588- with nogil:
589- status = dpiConn_getServerVersion(self ._handle, NULL , NULL ,
590- & version_info)
591- if status < 0 :
592- _raise_from_odpi()
593- return " %d .%d .%d .%d .%d " % \
594- (version_info.versionNum, version_info.releaseNum,
595- version_info.updateNum, version_info.portReleaseNum,
596- version_info.portUpdateNum)
597-
598597 def set_action (self , str value ):
599598 self ._set_text_attr(dpiConn_setAction, value)
600599
0 commit comments