Simplified SQLite's Decimal adapter.

This commit is contained in:
Sergey Fedoseev 2018-07-02 22:36:40 +05:00 committed by Tim Graham
parent 65df375c40
commit b49b59b029
2 changed files with 1 additions and 7 deletions

View File

@ -40,7 +40,7 @@ Database.register_converter("datetime", decoder(parse_datetime))
Database.register_converter("timestamp", decoder(parse_datetime))
Database.register_converter("TIMESTAMP", decoder(parse_datetime))
Database.register_adapter(decimal.Decimal, backend_utils.rev_typecast_decimal)
Database.register_adapter(decimal.Decimal, str)
class DatabaseWrapper(BaseDatabaseWrapper):

View File

@ -187,12 +187,6 @@ def typecast_timestamp(s): # does NOT store time zone information
# Converters from Python to database (string) #
###############################################
def rev_typecast_decimal(d):
if d is None:
return None
return str(d)
def split_identifier(identifier):
"""
Split a SQL identifier into a two element tuple of (namespace, name).