diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-13 10:52:00 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-14 12:51:58 -0400 |
| commit | 94a1c523984e2082bb16d784cf8615061ba9d49a (patch) | |
| tree | 73892187edabbfa4a371631c3407510cfdea9313 /lib/sqlalchemy/testing/assertions.py | |
| parent | de7f14104d5278987fa72d6866fa39569e56077e (diff) | |
| download | sqlalchemy-94a1c523984e2082bb16d784cf8615061ba9d49a.tar.gz | |
Support DEFAULT VALUES and VALUES(DEFAULT) individually
Fixed regression where the introduction of the INSERT syntax "INSERT...
VALUES (DEFAULT)" was not supported on some backends that do however
support "INSERT..DEFAULT VALUES", including SQLite. The two syntaxes are
now each individually supported or non-supported for each dialect, for
example MySQL supports "VALUES (DEFAULT)" but not "DEFAULT VALUES".
Support for Oracle is still not enabled as there are unresolved issues
in using RETURNING at the same time.
Fixes: #6254
Change-Id: I47959bc826e3d9d2396ccfa290eb084841b02e77
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
| -rw-r--r-- | lib/sqlalchemy/testing/assertions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py index 02137474b..9ff2f76eb 100644 --- a/lib/sqlalchemy/testing/assertions.py +++ b/lib/sqlalchemy/testing/assertions.py @@ -400,6 +400,7 @@ class AssertsCompiledSQL(object): use_default_dialect=False, allow_dialect_select=False, supports_default_values=True, + supports_default_metavalue=True, literal_binds=False, render_postcompile=False, schema_translate_map=None, @@ -410,6 +411,7 @@ class AssertsCompiledSQL(object): if use_default_dialect: dialect = default.DefaultDialect() dialect.supports_default_values = supports_default_values + dialect.supports_default_metavalue = supports_default_metavalue elif allow_dialect_select: dialect = None else: @@ -421,6 +423,7 @@ class AssertsCompiledSQL(object): elif dialect == "default": dialect = default.DefaultDialect() dialect.supports_default_values = supports_default_values + dialect.supports_default_metavalue = supports_default_metavalue elif dialect == "default_enhanced": dialect = default.StrCompileDialect() elif isinstance(dialect, util.string_types): |
