'Transform a decimal.Decimal value to an object compatible with what is
expected by the backend driver for decimal (numeric) columns.'

def value_to_db_decimal(self, value, max_digits, decimal_places):

    if (value is None):
        return None
    return util.format_number(value, max_digits, decimal_places)
