Michael Trier  committed a8651cf

Corrected an issue on mssql where Numerics would not accept an int.

  • Participants
  • Parent commits 1f55df9
  • Branches default

Comments (0)

Files changed (3)

       new doc section "Custom Comparators".
 - mssql
+    - Corrected an issue with Numerics to accept an int.
     - Mapped ``char_length`` to the ``LEN()`` function.
     - If an ``INSERT`` includes a subselect the ``INSERT`` is

File lib/sqlalchemy/databases/

   does **not** work around
-import datetime, inspect, operator, re, sys, urllib
+import datetime, decimal, inspect, operator, re, sys, urllib
 from sqlalchemy import sql, schema, exc, util
 from sqlalchemy.sql import compiler, expression, operators as sqlops, functions as sql_functions
                 # Not sure that this exception is needed
                 return value
-                if not isinstance(value, float) and value._exp < -6:
+                # FIXME: this will not correct a situation where a float
+                # gets converted to e-notation.
+                if isinstance(value, decimal.Decimal) and value._exp < -6:
                     value = ((value < 0 and '-' or '')
                         + '0.'
                         + '0' * -(value._exp+1)

File test/dialect/

-        except:
-            assert False
+            numeric_table.insert().execute(numericcol=10000)
+        except Exception, e:
+            raise e
 class TypesTest2(TestBase, AssertsExecutionResults):