Repository navigation
v4.9.3
Changed
Pass Through All Types by Default
All interpolated values now pass through as native Python objects by default, allowing database drivers with custom codecs to handle any type natively.
class Point:
def __init__(self, x, y):
self.x, self.y = x, y
# With a custom asyncpg codec, this just works
p = Point(3, 4)
query, params = tsql.render(t"INSERT INTO coords VALUES ({p})")
# params[0] is the Point object, not a stringFormat specs still stringify as before - {dt:%Y-%m-%d} will format the datetime to a string.
Fixed
Float Values in ESCAPED Style
Float values are now correctly rendered as numeric (19.99) instead of being quoted as strings ('19.99').
See commit f82e330 for full details.