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
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
else:
- 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)
numeric_table.insert().execute(numericcol=Decimal('1E-6'))
numeric_table.insert().execute(numericcol=Decimal('1E-7'))
numeric_table.insert().execute(numericcol=Decimal('1E-8'))
- except:
- assert False
+ numeric_table.insert().execute(numericcol=10000)
+ except Exception, e:
+ raise e
class TypesTest2(TestBase, AssertsExecutionResults):