Missing columns manipulation functions
from uuid import UUID, uuid4
from querybuilder.schemas.helper import table, make_column, ColumnSpec, functions
@table
class Person:
id : UUID # TODO change for UUID here
name : str
city : str
birth_year: int
The following columns manipulation would be nice to get:
Person.c.name + "@" + person.c.city # Return a column "Person.name || "@" || Person.city" (|| is the concatenation in SQL)
function.concat(Person.c.name, "@", person.c.city) # Return the same
Person.c.name.upper() # return a column "UPPER(Person.name)"
functions.upper(Person.c.name) # return the same
functions.lower(Person.c.name) # ...
# Other possibilities: substring, index, length, etc...
functions.gen_uuid() # Return a columns "gen_random_uid()" in PostgreSQL, raise in SQLite