summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-02-10 15:22:07 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-02-10 15:22:07 -0500
commitbc52cae455577fec6d97a7273adb04d2a8c0fba6 (patch)
tree3cb0e92d4b130bfaebf827e132f294ab4cbc8e96 /lib/sqlalchemy
parente43f85965e516218fd2630dba5d46cbdc8e00e09 (diff)
downloadsqlalchemy-bc52cae455577fec6d97a7273adb04d2a8c0fba6.tar.gz
- mssql VARBINARY emits 'max' for length when no length specified, as is
the case already for VARCHAR, NVARCHAR [ticket:1833]
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 0faa97077..c7fd20068 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -604,6 +604,12 @@ class MSTypeCompiler(compiler.GenericTypeCompiler):
def visit_IMAGE(self, type_):
return "IMAGE"
+ def visit_VARBINARY(self, type_):
+ return self._extend(
+ "VARBINARY",
+ type_,
+ length=type_.length or 'max')
+
def visit_boolean(self, type_):
return self.visit_BIT(type_)