summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2008-07-15 19:23:52 +0000
committerJason Kirtland <jek@discorporate.us>2008-07-15 19:23:52 +0000
commit8fa48edbf9d84093152aced94fc1eb7996b9827f (patch)
tree6ceb46f942f1a3b7f8994ba202fd5b02c21ec7c7 /lib/sqlalchemy/databases/mysql.py
parent6917ffb9bdae19a368abef5fdbd4655fc27fcdf2 (diff)
downloadsqlalchemy-8fa48edbf9d84093152aced94fc1eb7996b9827f.tar.gz
- Removed 2.3 set emulations/enhancements.
(sets.Set-based collections & DB-API returns still work.)
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py22
1 files changed, 11 insertions, 11 deletions
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" %