Skip to content

1.8.0

Compare
Choose a tag to compare
@dantownsend dantownsend released this 07 Jun 20:59
· 63 commits to master since this release

Added the Cast function, for performing type conversion.

Here's an example, where we convert a timestamp to time:

>>> from piccolo.columns import Time
>>> from piccolo.query.functions import Cast

>>> await Concert.select(Cast(Concert.starts, Time()))
[{'starts': datetime.time(19, 0)}]

A new section was also added to the docs describing functions in more detail.