コード例 #1
0
 def inspect_connection(provider, connection):
     cursor = connection.cursor()
     cursor.execute('SELECT version FROM product_component_version '
                    "WHERE product LIKE 'Oracle Database %'")
     provider.server_version = get_version_tuple(cursor.fetchone()[0])
     cursor.execute("SELECT sys_context( 'userenv', 'current_schema' ) FROM DUAL")
     provider.default_schema_name = cursor.fetchone()[0]
コード例 #2
0
ファイル: oracle.py プロジェクト: timedcy/pony
 def inspect_connection(provider, connection):
     cursor = connection.cursor()
     cursor.execute('SELECT version FROM product_component_version '
                    "WHERE product LIKE 'Oracle Database %'")
     provider.server_version = get_version_tuple(cursor.fetchone()[0])
     cursor.execute("SELECT sys_context( 'userenv', 'current_schema' ) FROM DUAL")
     provider.default_schema_name = cursor.fetchone()[0]
コード例 #3
0
 def inspect_connection(provider, connection):
     cursor = connection.cursor()
     cursor.execute('select version()')
     row = cursor.fetchone()
     assert row is not None
     provider.server_version = get_version_tuple(row[0])
     if provider.server_version >= (5, 6, 4):
         provider.max_time_precision = 6
     cursor.execute('select database()')
     provider.default_schema_name = cursor.fetchone()[0]
コード例 #4
0
ファイル: mysql.py プロジェクト: buddyli/android_intership
 def inspect_connection(provider, connection):
     cursor = connection.cursor()
     cursor.execute('select version()')
     row = cursor.fetchone()
     assert row is not None
     provider.server_version = get_version_tuple(row[0])
     if provider.server_version >= (5, 6, 4):
         provider.max_time_precision = 6
     cursor.execute('select database()')
     provider.default_schema_name = cursor.fetchone()[0]