Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

peewee print sql

def peewee_sql_to_str(sql):
    return (sql[0] % tuple(sql[1]))

insert_stmt = Pet.insert(name='Garfield')
sql = insert_stmt.sql()

print(peewee_sql_to_str(sql))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #peewee #print #sql
ADD COMMENT
Topic
Name
2+2 =