2010-02-07 142 views

回答

24

prefix_with("TEXT")增加和SQL其余INSERT之间任意文本。​​接受与记录词典列表,你想插入或者一个字典,如果你只需要插入一条记录。

的行为,你的SQLite的语法正在寻找:

inserter = table_object.insert().prefix_with("OR REPLACE") 
inserter.execute([{'column1':'value1'}, {'column1':'value2'}])