349cfbdebfb05d2faf51ae7c82eca81c97ed5c49,deeppavlov/core/data/sqlite_database.py,Sqlite3Database,_search,#Sqlite3Database#Any#Any#Any#,84

Before Change


                self.cursor.execute("SELECT * FROM {}".format(self.tname) +
                                    " ORDER BY {} {}".format(order_by, order))
            else:
                self.cursor.execute("SELECT * FROM {}".format(self.tname))
        else:
            keys = list(kv.keys())
            values = [kv[k] for k in keys]
            where_expr = " AND ".join("{}=?".format(k) for k in keys)
            if order_by is not None:
                self.cursor.execute("SELECT * FROM {}".format(self.tname) +
                                    " WHERE {}".format(where_expr) +
                                    " ORDER BY {} {}".format(order_by, order),
                                    values)
            else:

After Change


        else:
            keys = list(kv.keys())
            values = [kv[k] for k in keys]
            where_expr = " AND ".join(f"{k}=?" for k in keys)
            if order_by is not None:
                self.cursor.execute(f"SELECT * FROM {self.tname}" +
                                    f" WHERE {where_expr}" +
                                    f" ORDER BY {order_by} {order}",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

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: _search


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: 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: _get_record