I ran into trouble. I've read through manual to pypika and I haven't found out, how to define constant column.
E.g.
SELECT t.id,
'constant' as constant_variable
FROM example_table t
I've tried using PseudoColumn, but it didn't work for me.
car = PseudoColumn('CAR')
query = Query \
.from_('test_table') \
.select(car)
print(query)
The result is
SELECT CAR FROM "test_table"
Instead of
SELECT 'CAR' FROM "test_table"
One of the ways to do it is to use ValueWrapper from pypika.terms. Same as in example above, but instead of PseudoColumn('CAR') use ValueWrapper('CAR', 'alias').