浏览代码

Can't use executemany() here.

tags/v1.0^2
Ben Kurtovic 10 年前
父节点
当前提交
b6fabc54ec
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      bitshift/database/__init__.py

+ 3
- 2
bitshift/database/__init__.py 查看文件

@@ -103,8 +103,9 @@ class Database(object):
WHERE codelet_id = ?"""

with self._conn.cursor(oursql.DictCursor) as dict_cursor:
dict_cursor.executemany(query, [(id,) for id in ids])
for row in dict_cursor.fetchone():
for codelet_id in ids:
dict_cursor.execute(query, (codelet_id,))
row = dict_cursor.fetchall()[0]
codelet_id = row["codelet_id"]
if row["origin_url_base"]:
url = row["codelet_url"]


正在加载...
取消
保存