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]
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]