1.6.0
Added support for a bunch of Postgres functions, like Upper
, Lower
, Length
, and Ltrim
. They can be used in select
queries:
from piccolo.query.functions.string import Upper
>>> await Band.select(Upper(Band.name, alias="name"))
[{"name": "PYTHONISTAS"}]
And also in where
clauses:
>>> await Band.select().where(Upper(Band.manager.name) == 'GUIDO')
[{"name": "Pythonistas"}]