summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-11-14 12:36:09 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-11-14 12:38:45 -0500
commit0847097c29ab48a5f111518e2c6ee324d5242057 (patch)
tree35e830b3c8aa965d78bd8638335f7b8d3f90a3bc /lib/sqlalchemy
parentac9ded338fa85054f4277f0f92d7416ef26c53ed (diff)
downloadsqlalchemy-0847097c29ab48a5f111518e2c6ee324d5242057.tar.gz
- extend pullreq github:213 to also include DATETIMEOFFSET and TIME,
which also accept zero precision - extend test case here to include a backend-agnostic suite - changelog for MSSQL date fix
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 9e39ca9f2..487f21df9 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -759,14 +759,14 @@ class MSTypeCompiler(compiler.GenericTypeCompiler):
return "TINYINT"
def visit_DATETIMEOFFSET(self, type_, **kw):
- if type_.precision:
+ if type_.precision is not None:
return "DATETIMEOFFSET(%s)" % type_.precision
else:
return "DATETIMEOFFSET"
def visit_TIME(self, type_, **kw):
precision = getattr(type_, 'precision', None)
- if precision:
+ if precision is not None:
return "TIME(%s)" % precision
else:
return "TIME"