diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/__init__.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 27 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/gaerdbms.py | 6 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mysqlconnector.py | 9 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mysqldb.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/oursql.py | 8 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/pymysql.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/pyodbc.py | 7 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/zxjdbc.py | 6 |
9 files changed, 32 insertions, 41 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/__init__.py b/lib/sqlalchemy/dialects/mysql/__init__.py index b55a84a1b..d0e4160e4 100644 --- a/lib/sqlalchemy/dialects/mysql/__init__.py +++ b/lib/sqlalchemy/dialects/mysql/__init__.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 -from sqlalchemy.dialects.mysql import base, mysqldb, oursql, \ +from . import base, mysqldb, oursql, \ pyodbc, zxjdbc, mysqlconnector, pymysql,\ gaerdbms # default dialect base.dialect = mysqldb.dialect -from sqlalchemy.dialects.mysql.base import \ +from .base import \ BIGINT, BINARY, BIT, BLOB, BOOLEAN, CHAR, DATE, DATETIME, \ DECIMAL, DOUBLE, ENUM, DECIMAL,\ FLOAT, INTEGER, INTEGER, LONGBLOB, LONGTEXT, MEDIUMBLOB, \ diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index ff1cf625c..d8bef2d4b 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -281,24 +281,25 @@ http://dev.mysql.com/doc/refman/5.0/en/create-table.html """ -import datetime, inspect, re, sys - -from sqlalchemy import schema as sa_schema -from sqlalchemy import exc, log, sql, util -from sqlalchemy.sql import operators as sql_operators -from sqlalchemy.sql import functions as sql_functions -from sqlalchemy.sql import compiler +import datetime +import inspect +import re +import sys + +from ... import schema as sa_schema +from ... import exc, log, sql, util +from ...sql import compiler from array import array as _array -from sqlalchemy.engine import reflection -from sqlalchemy.engine import base as engine_base, default -from sqlalchemy import types as sqltypes -from sqlalchemy.util import topological -from sqlalchemy.types import DATE, DATETIME, BOOLEAN, TIME, \ +from ...engine import reflection +from ...engine import default +from ... import types as sqltypes +from ...util import topological +from ...types import DATE, DATETIME, BOOLEAN, TIME, \ BLOB, BINARY, VARBINARY RESERVED_WORDS = set( - ['accessible', 'add', 'all', 'alter', 'analyze','and', 'as', 'asc', + ['accessible', 'add', 'all', 'alter', 'analyze', 'and', 'as', 'asc', 'asensitive', 'before', 'between', 'bigint', 'binary', 'blob', 'both', 'by', 'call', 'cascade', 'case', 'change', 'char', 'character', 'check', 'collate', 'column', 'condition', 'constraint', 'continue', 'convert', diff --git a/lib/sqlalchemy/dialects/mysql/gaerdbms.py b/lib/sqlalchemy/dialects/mysql/gaerdbms.py index 0fe5d635a..a56d4b791 100644 --- a/lib/sqlalchemy/dialects/mysql/gaerdbms.py +++ b/lib/sqlalchemy/dialects/mysql/gaerdbms.py @@ -32,8 +32,8 @@ default. """ -from sqlalchemy.dialects.mysql.mysqldb import MySQLDialect_mysqldb -from sqlalchemy.pool import NullPool +from .mysqldb import MySQLDialect_mysqldb +from ...pool import NullPool import re @@ -50,7 +50,7 @@ class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): return NullPool def create_connect_args(self, url): - return [[],{'database':url.database}] + return [[], {'database': url.database}] def _extract_error_code(self, exception): match = re.compile(r"^(\d+):").match(str(exception)) diff --git a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py index be99367be..9aa4b3922 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py +++ b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py @@ -19,16 +19,11 @@ Connect string format:: """ -import re - -from sqlalchemy.dialects.mysql.base import (MySQLDialect, +from .base import (MySQLDialect, MySQLExecutionContext, MySQLCompiler, MySQLIdentifierPreparer, BIT) -from sqlalchemy.engine import base as engine_base, default -from sqlalchemy.sql import operators as sql_operators -from sqlalchemy import exc, log, schema, sql, types as sqltypes, util -from sqlalchemy import processors +from ... import util class MySQLExecutionContext_mysqlconnector(MySQLExecutionContext): diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index 240f30251..21b87a018 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -54,9 +54,9 @@ It is strongly advised to use the latest version of MySQL-Python. """ -from sqlalchemy.dialects.mysql.base import (MySQLDialect, MySQLExecutionContext, +from .base import (MySQLDialect, MySQLExecutionContext, MySQLCompiler, MySQLIdentifierPreparer) -from sqlalchemy.connectors.mysqldb import ( +from ...connectors.mysqldb import ( MySQLDBExecutionContext, MySQLDBCompiler, MySQLDBIdentifierPreparer, diff --git a/lib/sqlalchemy/dialects/mysql/oursql.py b/lib/sqlalchemy/dialects/mysql/oursql.py index 8f7bebe9c..7a51c9e4e 100644 --- a/lib/sqlalchemy/dialects/mysql/oursql.py +++ b/lib/sqlalchemy/dialects/mysql/oursql.py @@ -40,12 +40,8 @@ defaults to, there is a separate parameter:: import re -from sqlalchemy.dialects.mysql.base import (BIT, MySQLDialect, MySQLExecutionContext, - MySQLCompiler, MySQLIdentifierPreparer) -from sqlalchemy.engine import base as engine_base, default -from sqlalchemy.sql import operators as sql_operators -from sqlalchemy import exc, log, schema, sql, types as sqltypes, util -from sqlalchemy import processors +from .base import (BIT, MySQLDialect, MySQLExecutionContext) +from ... import types as sqltypes, util diff --git a/lib/sqlalchemy/dialects/mysql/pymysql.py b/lib/sqlalchemy/dialects/mysql/pymysql.py index 8387dfecb..71548880c 100644 --- a/lib/sqlalchemy/dialects/mysql/pymysql.py +++ b/lib/sqlalchemy/dialects/mysql/pymysql.py @@ -26,7 +26,7 @@ the pymysql driver as well. """ -from sqlalchemy.dialects.mysql.mysqldb import MySQLDialect_mysqldb +from .mysqldb import MySQLDialect_mysqldb class MySQLDialect_pymysql(MySQLDialect_mysqldb): driver = 'pymysql' diff --git a/lib/sqlalchemy/dialects/mysql/pyodbc.py b/lib/sqlalchemy/dialects/mysql/pyodbc.py index 6271286f9..03906f8c9 100644 --- a/lib/sqlalchemy/dialects/mysql/pyodbc.py +++ b/lib/sqlalchemy/dialects/mysql/pyodbc.py @@ -27,10 +27,9 @@ of OurSQL, MySQLdb, or MySQL-connector/Python. """ -from sqlalchemy.dialects.mysql.base import MySQLDialect, MySQLExecutionContext -from sqlalchemy.connectors.pyodbc import PyODBCConnector -from sqlalchemy.engine import base as engine_base -from sqlalchemy import util +from .base import MySQLDialect, MySQLExecutionContext +from ...connectors.pyodbc import PyODBCConnector +from ... import util import re class MySQLExecutionContext_pyodbc(MySQLExecutionContext): diff --git a/lib/sqlalchemy/dialects/mysql/zxjdbc.py b/lib/sqlalchemy/dialects/mysql/zxjdbc.py index 816e10bae..d25444cd0 100644 --- a/lib/sqlalchemy/dialects/mysql/zxjdbc.py +++ b/lib/sqlalchemy/dialects/mysql/zxjdbc.py @@ -31,9 +31,9 @@ overriden via a ``create_engine`` URL parameter. """ import re -from sqlalchemy import types as sqltypes, util -from sqlalchemy.connectors.zxJDBC import ZxJDBCConnector -from sqlalchemy.dialects.mysql.base import BIT, MySQLDialect, MySQLExecutionContext +from ... import types as sqltypes, util +from ...connectors.zxJDBC import ZxJDBCConnector +from .base import BIT, MySQLDialect, MySQLExecutionContext class _ZxJDBCBit(BIT): def result_processor(self, dialect, coltype): |