问题
how to do
select 'blah' as dummycolumn
in peewee??
I have tried
MyTable.select('blah')
but it is not working
回答1:
MyModel.select(
MyModel.some_field.alias('another_name'),
Value('a string literal').alias('a_string'),
Value(12345).alias('a_number'))
来源:https://stackoverflow.com/questions/36395229/how-to-select-dummy-column-in-peewee