2010-02-07 143 views

回答

24

prefix_with("TEXT")增加和SQL其餘INSERT之間任意文本。​​接受與記錄詞典列表,你想插入或者一個字典,如果你只需要插入一條記錄。

的行爲,你的SQLite的語法正在尋找:

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