diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-04-21 22:49:09 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-28 20:03:27 -0400 |
| commit | d3c73ad8012e15bf47529b3fcb0bac1298fbdb90 (patch) | |
| tree | 31ae2c420b9d58d55e56a9191a34176c1deb7c16 /lib/sqlalchemy/engine/default.py | |
| parent | 1443945e61f1f113e46a5044315a91558d4d232a (diff) | |
| download | sqlalchemy-d3c73ad8012e15bf47529b3fcb0bac1298fbdb90.tar.gz | |
Propertly ignore ``Identity`` in MySQL and MariaDb.
Ensure that the MySQL and MariaDB dialect ignore the
:class:`_sql.Identity` construct while rendering the
``AUTO_INCREMENT`` keyword in a create table.
The Oracle and PostgreSQL compiler was updated to not render
:class:`_sql.Identity` if the database version does not support it
(Oracle < 12 and PostgreSQL < 10). Previously it was rendered regardless
of the database version.
Fixes: #6338
Change-Id: I2ca0902fdd7b4be4fc1a563cf5585504cbea9360
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index a917228ad..aa7e4e5e9 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -74,6 +74,7 @@ class DefaultDialect(interfaces.Dialect): supports_sequences = False sequences_optional = False preexecute_autoincrement_sequences = False + supports_identity_columns = False postfetch_lastrowid = True implicit_returning = False full_returning = False @@ -808,6 +809,8 @@ class StrCompileDialect(DefaultDialect): supports_statement_cache = True + supports_identity_columns = True + supports_sequences = True sequences_optional = True preexecute_autoincrement_sequences = False |
