Most of time we'll use following way to create items with peewee:
User.create(name='aa', age=20, ...)
But in some circumstances the Table name is stored in a variable. I notice I can use database.execute_sql()
to execute raw SQL statement. But I think it's a little messy.
Is there a way to do something like this?
#{TableName}.create(name='aa', age=20, ...)
Thanks for your time!