diff options
author | Michael Trier <mtrier@gmail.com> | 2008-10-20 15:21:00 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-10-20 15:21:00 +0000 |
commit | c81c7ff3d59469cf6ceccbcf1593fd0563f0eaf3 (patch) | |
tree | d12139bc6c793c7190c3fb1d344a49c37080d635 /lib/sqlalchemy/databases/mssql.py | |
parent | abcb5605f91ef206dd5f0f6400302f0b28425365 (diff) | |
download | sqlalchemy-c81c7ff3d59469cf6ceccbcf1593fd0563f0eaf3.tar.gz |
Modifications to allow the backends to control the behavior of an empty insert. If supports_empty_insert is True then the backend specifically supports the 'insert into t1 () values ()' syntax. If supports_default_values is True then the backend supports the 'insert into t1 default values' syntax. If both are false then the backend has no support for empty inserts at all and an exception gets raised. Changes here are careful to not change current behavior except where the current behavior was failing to begin with.
Diffstat (limited to 'lib/sqlalchemy/databases/mssql.py')
-rw-r--r-- | lib/sqlalchemy/databases/mssql.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 1ff482cf5..4bbc2caf7 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -361,6 +361,8 @@ class MSSQLExecutionContext_pyodbc (MSSQLExecutionContext): class MSSQLDialect(default.DefaultDialect): name = 'mssql' + supports_default_values = True + supports_empty_insert = False colspecs = { sqltypes.Unicode : MSNVarchar, |