return self.schema_name
def table_names(self, connection, schema):
- from sqlalchemy.databases import information_schema as ischema
+ from sqlalchemy.dialects import information_schema as ischema
return ischema.table_names(connection, schema)
def uppercase_table(self, t):
def has_table(self, connection, tablename, schema=None):
- import sqlalchemy.databases.information_schema as ischema
+ import sqlalchemy.dialects.information_schema as ischema
current_schema = schema or self.get_default_schema_name(connection)
columns = self.uppercase_table(ischema.columns)
return row is not None
def reflecttable(self, connection, table, include_columns):
- import sqlalchemy.databases.information_schema as ischema
+ import sqlalchemy.dialects.information_schema as ischema
# Get base columns
if table.schema is not None:
current_schema = table.schema
class MSExecutionContext_pyodbc(MSExecutionContext):
def pre_exec(self):
"""where appropriate, issue "select scope_identity()" in the same statement"""
- super(MSSQLExecutionContext_pyodbc, self).pre_exec()
+ super(MSExecutionContext_pyodbc, self).pre_exec()
if self.compiled.isinsert and self.HASIDENT and not self.IINSERT \
and len(self.parameters) == 1 and self.dialect.use_scope_identity:
self.statement += "; select scope_identity()"
self.cursor.nextset()
self._last_inserted_ids = [int(row[0])]
else:
- super(MSSQLExecutionContext_pyodbc, self).post_exec()
+ super(MSExecutionContext_pyodbc, self).post_exec()
class MSDialect_pyodbc(PyODBCConnector, MSDialect):
else:
return False
-dialect = MSDialect_pyodbc
\ No newline at end of file
+dialect = MSDialect_pyodbc