349cfbdebfb05d2faf51ae7c82eca81c97ed5c49,deeppavlov/core/data/sqlite_database.py,Sqlite3Database,_update_one,#Sqlite3Database#Any#,176
Before Change
set_expr = ", ".join("{} = "{}"".format(k, v)
for k, v in zip(self.keys, record)
if k not in self.primary_keys)
where_expr = " AND ".join("{} = "{}"".format(k, v)
for k, v in zip(self.keys, record)
if k in self.primary_keys)
self.cursor.execute("UPDATE {}".format(self.tname) +
" SET {}".format(set_expr) +
" WHERE {}".format(where_expr))
def save(self):
pass
After Change
where_expr = " AND ".join(f"{k} = "{v}""
for k, v in zip(self.keys, record)
if k in self.primary_keys)
self.cursor.execute(f"UPDATE {self.tname}" +
f" SET {set_expr}" +
f" WHERE {where_expr}")
def save(self):
pass
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: 349cfbdebfb05d2faf51ae7c82eca81c97ed5c49
Time: 2019-09-06
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/core/data/sqlite_database.py
Class Name: Sqlite3Database
Method Name: _update_one
Project Name: deepmipt/DeepPavlov
Commit Name: 349cfbdebfb05d2faf51ae7c82eca81c97ed5c49
Time: 2019-09-06
Author: mary.vikhreva@gmail.com
File Name: deeppavlov/core/data/sqlite_database.py
Class Name: Sqlite3Database
Method Name: _search
Project Name: deepmipt/DeepPavlov
Commit Name: 0f4ca6a6c054bcc5e2c594cc6cb8f81276d716b6
Time: 2019-09-06
Author: yoptar@gmail.com
File Name: deeppavlov/core/data/sqlite_database.py
Class Name: Sqlite3Database
Method Name: _search