diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqlalchemy/databases/__init__.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/informix.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/oracle.py | 3 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/databases/sqlite.py | 3 | ||||
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 5 |
7 files changed, 12 insertions, 9 deletions
diff --git a/lib/sqlalchemy/databases/__init__.py b/lib/sqlalchemy/databases/__init__.py index 57a8321d7..9d91ed66c 100644 --- a/lib/sqlalchemy/databases/__init__.py +++ b/lib/sqlalchemy/databases/__init__.py @@ -7,5 +7,5 @@ __all__ = [ 'sqlite', 'postgres', 'mysql', 'oracle', 'mssql', 'firebird', - 'sybase', 'access', 'maxdb', + 'sybase', 'access', 'maxdb', 'monetdb' ] diff --git a/lib/sqlalchemy/databases/informix.py b/lib/sqlalchemy/databases/informix.py index d91b1b9b8..2e1f19de9 100644 --- a/lib/sqlalchemy/databases/informix.py +++ b/lib/sqlalchemy/databases/informix.py @@ -206,13 +206,13 @@ class InfoExecutionContext(default.DefaultExecutionContext): return informix_cursor( self.connection.connection ) class InfoDialect(default.DefaultDialect): + default_paramstyle = 'qmark' # for informix 7.31 max_identifier_length = 18 def __init__(self, use_ansi=True,**kwargs): self.use_ansi = use_ansi default.DefaultDialect.__init__(self, **kwargs) - self.paramstyle = 'qmark' def dbapi(cls): import informixdb diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index c4b8af684..a86035be5 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -1420,10 +1420,10 @@ class MySQLDialect(default.DefaultDialect): # identifiers are 64, however aliases can be 255... max_identifier_length = 255 supports_sane_rowcount = True + default_paramstyle = 'format' def __init__(self, use_ansiquotes=None, **kwargs): self.use_ansiquotes = use_ansiquotes - kwargs.setdefault('default_paramstyle', 'format') default.DefaultDialect.__init__(self, **kwargs) def dbapi(cls): diff --git a/lib/sqlalchemy/databases/oracle.py b/lib/sqlalchemy/databases/oracle.py index 5ce94a992..734ad58d1 100644 --- a/lib/sqlalchemy/databases/oracle.py +++ b/lib/sqlalchemy/databases/oracle.py @@ -240,9 +240,10 @@ class OracleDialect(default.DefaultDialect): supports_sane_multi_rowcount = False preexecute_pk_sequences = True supports_pk_autoincrement = False + default_paramstyle = 'named' def __init__(self, use_ansi=True, auto_setinputsizes=True, auto_convert_lobs=True, threaded=True, allow_twophase=True, **kwargs): - default.DefaultDialect.__init__(self, default_paramstyle='named', **kwargs) + default.DefaultDialect.__init__(self, **kwargs) self.use_ansi = use_ansi self.threaded = threaded self.allow_twophase = allow_twophase diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 326dd6b7d..605ce7272 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -309,12 +309,12 @@ class PGDialect(default.DefaultDialect): supports_sane_multi_rowcount = False preexecute_pk_sequences = True supports_pk_autoincrement = False + default_paramstyle = 'pyformat' def __init__(self, use_oids=False, server_side_cursors=False, **kwargs): - default.DefaultDialect.__init__(self, default_paramstyle='pyformat', **kwargs) + default.DefaultDialect.__init__(self, **kwargs) self.use_oids = use_oids self.server_side_cursors = server_side_cursors - self.paramstyle = 'pyformat' def dbapi(cls): import psycopg2 as psycopg diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 88e4f74cf..f8bea90eb 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -195,9 +195,10 @@ class SQLiteExecutionContext(default.DefaultExecutionContext): class SQLiteDialect(default.DefaultDialect): supports_alter = False supports_unicode_statements = True + default_paramstyle = 'qmark' def __init__(self, **kwargs): - default.DefaultDialect.__init__(self, default_paramstyle='qmark', **kwargs) + default.DefaultDialect.__init__(self, **kwargs) def vers(num): return tuple([int(x) for x in num.split('.')]) if self.dbapi is not None: diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index dfeefa337..65867d413 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -39,8 +39,9 @@ class DefaultDialect(base.Dialect): preexecute_pk_sequences = False supports_pk_autoincrement = True dbapi_type_map = {} + default_paramstyle = 'named' - def __init__(self, convert_unicode=False, assert_unicode=False, encoding='utf-8', default_paramstyle='named', paramstyle=None, dbapi=None, **kwargs): + def __init__(self, convert_unicode=False, assert_unicode=False, encoding='utf-8', paramstyle=None, dbapi=None, **kwargs): self.convert_unicode = convert_unicode self.assert_unicode = assert_unicode self.encoding = encoding @@ -52,7 +53,7 @@ class DefaultDialect(base.Dialect): elif self.dbapi is not None: self.paramstyle = self.dbapi.paramstyle else: - self.paramstyle = default_paramstyle + self.paramstyle = self.default_paramstyle self.positional = self.paramstyle in ('qmark', 'format', 'numeric') self.identifier_preparer = self.preparer(self) |