diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-07-15 19:23:52 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-07-15 19:23:52 +0000 |
commit | 8fa48edbf9d84093152aced94fc1eb7996b9827f (patch) | |
tree | 6ceb46f942f1a3b7f8994ba202fd5b02c21ec7c7 /lib/sqlalchemy/databases | |
parent | 6917ffb9bdae19a368abef5fdbd4655fc27fcdf2 (diff) | |
download | sqlalchemy-8fa48edbf9d84093152aced94fc1eb7996b9827f.tar.gz |
- Removed 2.3 set emulations/enhancements.
(sets.Set-based collections & DB-API returns still work.)
Diffstat (limited to 'lib/sqlalchemy/databases')
-rw-r--r-- | lib/sqlalchemy/databases/firebird.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/maxdb.py | 8 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/mssql.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 22 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/sqlite.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/sybase.py | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/lib/sqlalchemy/databases/firebird.py b/lib/sqlalchemy/databases/firebird.py index c7b64a6b2..aba834f64 100644 --- a/lib/sqlalchemy/databases/firebird.py +++ b/lib/sqlalchemy/databases/firebird.py @@ -747,7 +747,7 @@ class FBDefaultRunner(base.DefaultRunner): self.dialect.identifier_preparer.format_sequence(seq)) -RESERVED_WORDS = util.Set( +RESERVED_WORDS = set( ["action", "active", "add", "admin", "after", "all", "alter", "and", "any", "as", "asc", "ascending", "at", "auto", "autoddl", "avg", "based", "basename", "base_name", "before", "begin", "between", "bigint", "blob", "blobedit", "buffer", diff --git a/lib/sqlalchemy/databases/maxdb.py b/lib/sqlalchemy/databases/maxdb.py index b3f232a17..c9ea2b579 100644 --- a/lib/sqlalchemy/databases/maxdb.py +++ b/lib/sqlalchemy/databases/maxdb.py @@ -602,7 +602,7 @@ class MaxDBDialect(default.DefaultDialect): if not rows: raise exc.NoSuchTableError(table.fullname) - include_columns = util.Set(include_columns or []) + include_columns = set(include_columns or []) for row in rows: (name, mode, col_type, encoding, length, scale, @@ -666,7 +666,7 @@ class MaxDBDialect(default.DefaultDialect): for fkeyname, fkey in fk_sets: fkey = list(fkey) if include_columns: - key_cols = util.Set([r.COLUMNNAME for r in fkey]) + key_cols = set([r.COLUMNNAME for r in fkey]) if key_cols != include_columns: continue @@ -732,7 +732,7 @@ class MaxDBCompiler(compiler.DefaultCompiler): # These functions must be written without parens when called with no # parameters. e.g. 'SELECT DATE FROM DUAL' not 'SELECT DATE() FROM DUAL' - bare_functions = util.Set([ + bare_functions = set([ 'CURRENT_SCHEMA', 'DATE', 'FALSE', 'SYSDBA', 'TIME', 'TIMESTAMP', 'TIMEZONE', 'TRANSACTION', 'TRUE', 'USER', 'UID', 'USERGROUP', 'UTCDATE', 'UTCDIFF']) @@ -893,7 +893,7 @@ class MaxDBDefaultRunner(engine_base.DefaultRunner): class MaxDBIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words = util.Set([ + reserved_words = set([ 'abs', 'absolute', 'acos', 'adddate', 'addtime', 'all', 'alpha', 'alter', 'any', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'binary', 'bit', 'boolean', 'byte', 'case', 'ceil', 'ceiling', 'char', diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index ce9ca441e..1aea72a96 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -47,7 +47,7 @@ from sqlalchemy import types as sqltypes from sqlalchemy.util import Decimal as _python_Decimal -MSSQL_RESERVED_WORDS = util.Set(['function']) +MSSQL_RESERVED_WORDS = set(['function']) class MSNumeric(sqltypes.Numeric): def result_processor(self, dialect): diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index f40fa71c1..704abbe6d 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -175,7 +175,7 @@ __all__ = ( 'MSTinyText', 'MSVarBinary', 'MSYear' ) -RESERVED_WORDS = util.Set( +RESERVED_WORDS = set( ['accessible', 'add', 'all', 'alter', 'analyze','and', 'as', 'asc', 'asensitive', 'before', 'between', 'bigint', 'binary', 'blob', 'both', 'by', 'call', 'cascade', 'case', 'change', 'char', 'character', 'check', @@ -1265,12 +1265,12 @@ class MSSet(MSString): if not value: value.add('') # ..some return sets.Set, even for pythons that have __builtin__.set - if not isinstance(value, util.Set): - value = util.Set(value) + if not isinstance(value, set): + value = set(value) return value # ...and some versions return strings if value is not None: - return util.Set(value.split(',')) + return set(value.split(',')) else: return value return process @@ -1282,7 +1282,7 @@ class MSSet(MSString): pass else: if None in value: - value = util.Set(value) + value = set(value) value.remove(None) value.add('') value = ','.join(value) @@ -1984,7 +1984,7 @@ class MySQLCompiler(compiler.DefaultCompiler): return ' \n LIMIT %s' % (limit,) def visit_update(self, update_stmt): - self.stack.append({'from':util.Set([update_stmt.table])}) + self.stack.append({'from': set([update_stmt.table])}) self.isupdate = True colparams = self._get_colparams(update_stmt) @@ -2104,7 +2104,7 @@ class MySQLSchemaReflector(object): keys, constraints = [], [] if only: - only = util.Set(only) + only = set(only) for line in re.split(r'\r?\n', show_create): if line.startswith(' ' + self.preparer.initial_quote): @@ -2244,7 +2244,7 @@ class MySQLSchemaReflector(object): flavor = spec['type'] col_names = [s[0] for s in spec['columns']] - if only and not util.Set(col_names).issubset(only): + if only and not set(col_names).issubset(only): if flavor is None: flavor = 'index' self.logger.info( @@ -2280,7 +2280,7 @@ class MySQLSchemaReflector(object): ref_schema = len(spec['table']) > 1 and spec['table'][-2] or None loc_names = spec['local'] - if only and not util.Set(loc_names).issubset(only): + if only and not set(loc_names).issubset(only): self.logger.info( "Omitting FOREIGN KEY for (%s), key covers ommitted " "columns." % (', '.join(loc_names))) @@ -2295,8 +2295,8 @@ class MySQLSchemaReflector(object): autoload=True, autoload_with=connection) ref_names = spec['foreign'] - if not util.Set(ref_names).issubset( - util.Set([c.name for c in ref_table.c])): + if not set(ref_names).issubset( + set(c.name for c in ref_table.c)): raise exc.InvalidRequestError( "Foreign key columns (%s) are not present on " "foreign table %s" % diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 26f1ecb91..b6e362ef2 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -475,7 +475,7 @@ class SQLiteSchemaDropper(compiler.SchemaDropper): pass class SQLiteIdentifierPreparer(compiler.IdentifierPreparer): - reserved_words = util.Set([ + reserved_words = set([ 'add', 'after', 'all', 'alter', 'analyze', 'and', 'as', 'asc', 'attach', 'autoincrement', 'before', 'begin', 'between', 'by', 'cascade', 'case', 'cast', 'check', 'collate', 'column', 'commit', diff --git a/lib/sqlalchemy/databases/sybase.py b/lib/sqlalchemy/databases/sybase.py index fd5b875a2..aea77f8bf 100644 --- a/lib/sqlalchemy/databases/sybase.py +++ b/lib/sqlalchemy/databases/sybase.py @@ -46,7 +46,7 @@ __all__ = [ ] -RESERVED_WORDS = util.Set([ +RESERVED_WORDS = set([ "add", "all", "alter", "and", "any", "as", "asc", "backup", "begin", "between", "bigint", "binary", |