-
2020年8月31日 10:40
python 检查路径是否存在(合法) 如果不存在在创建文件
-
2020年8月29日 16:58
mac pycharm 进行断点(debug)调试代码
-
2020年8月27日 14:00
django 如何获取django orm对应的sql语句
-
2020年8月27日 13:57
django 使用uuid代替id作为主键primary
-
2020年8月26日 18:34
sqlite 创建表时为多个字段添加索引
-
2020年8月26日 18:29
sqlite 检查表是否存在
-
2020年8月24日 19:59
sqlite3 IntegrityError: UNIQUE constraint failed when inserting a value
-
2020年8月24日 19:51
sqlite 如何避免插入重复数据
背景:在爬虫中,经常会需要保留从网页中提取的url,这时会遇到一个问题,随着爬虫运行时间,会发现页面中很多的url是重复数据。因此sqlite 如何避免插入重复数据?解决方法:insert or replace:如果不存在就插入,存在就更新 insert or ignore:如果不存在就插入,存在就忽略注意:该语法只支持字段为唯一索引 unique,如果字段不是唯一索引,使用insert or replace 后者insert or ignore时会提示错误:sqlite3, IntegrityError: UNIQUE constraint
-
2020年8月23日 17:34
python 使用sqlite需要使用游标cursor?
-
2020年8月22日 22:36
python sqlite3 批量插入数据