summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-07-17 13:56:50 +0000
committerJason Kirtland <jek@discorporate.us>2007-07-17 13:56:50 +0000
commit7e1cf0cef4d799e294bec945605efbbf6c3ca1c4 (patch)
treed8e925ed4679e6906a6fd6f249e08e427d8bb1fc /lib/sqlalchemy/databases/mysql.py
parent378bf5b2fce6330d255608115b2f1c208052eaa1 (diff)
downloadsqlalchemy-7e1cf0cef4d799e294bec945605efbbf6c3ca1c4.tar.gz
Minor cleanups.
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 31bfa8449..2c42ad3ce 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -4,14 +4,14 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
-import sys, StringIO, string, types, re, datetime, inspect, warnings
+import re, datetime, inspect, warnings
-from sqlalchemy import sql,engine,schema,ansisql
+from sqlalchemy import sql,schema,ansisql
from sqlalchemy.engine import default
import sqlalchemy.types as sqltypes
import sqlalchemy.exceptions as exceptions
import sqlalchemy.util as util
-from array import array
+from array import array as _array
RESERVED_WORDS = util.Set(
['accessible', 'add', 'all', 'alter', 'analyze','and', 'as', 'asc',
@@ -1040,7 +1040,7 @@ class MySQLDialect(ansisql.ANSIDialect):
def get_default_schema_name(self):
if not hasattr(self, '_default_schema_name'):
- self._default_schema_name = text("select database()", self).scalar()
+ self._default_schema_name = sql.text("select database()", self).scalar()
return self._default_schema_name
def has_table(self, connection, table_name, schema=None):
@@ -1213,7 +1213,7 @@ class _MySQLPythonRowProxy(object):
self.charset = charset
def __getitem__(self, index):
item = self.rowproxy[index]
- if isinstance(item, array):
+ if isinstance(item, _array):
item = item.tostring()
if self.charset and isinstance(item, unicode):
return item.encode(self.charset)
@@ -1221,7 +1221,7 @@ class _MySQLPythonRowProxy(object):
return item
def __getattr__(self, attr):
item = getattr(self.rowproxy, attr)
- if isinstance(item, array):
+ if isinstance(item, _array):
item = item.tostring()
if self.charset and isinstance(item, unicode):
return item.encode(self.charset)