ce2c2d1926f26813e7d4da5fa7bbb82492c05114,util/database.py,Database,NewMethod,#Database#,410
Before Change
with self.con:
self.cur.execute("INSERT INTO methods VALUES (NULL,?, ?,?)",
(name, parameters, alias))
self.cur.execute("SELECT last_insert_rowid()")
return self.cur.fetchall()[0][0]
def UpdateMethod(self, methodId, alias):
self.cur.execute("UPDATE methods SET alias=\"" + alias + "\" WHERE id="
After Change
"""
def NewMethod(self, name, parameters, alias):
with self.con:
command = "INSERT INTO methods VALUES (NULL,%s,%s,%s)"
if self.driver == "mysql":
self.cur.execute(command, (name, parameters, alias))
self.cur.execute("SELECT LAST_INSERT_ID()")
elif self.driver == "sqlite":
self.cur.execute(command % ("?", "?", "?"), (name, parameters, alias))
self.cur.execute("SELECT last_insert_rowid()")
return self.cur.fetchall()[0][0]
def UpdateMethod(self, methodId, alias):
self.cur.execute("UPDATE methods SET alias=\"" + alias + "\" WHERE id="
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
Instances
Project Name: mlpack/benchmarks
Commit Name: ce2c2d1926f26813e7d4da5fa7bbb82492c05114
Time: 2016-09-21
Author: marcus.edel@fu-berlin.de
File Name: util/database.py
Class Name: Database
Method Name: NewMethod
Project Name: mlpack/benchmarks
Commit Name: ce2c2d1926f26813e7d4da5fa7bbb82492c05114
Time: 2016-09-21
Author: marcus.edel@fu-berlin.de
File Name: util/database.py
Class Name: Database
Method Name: NewMethod
Project Name: mlpack/benchmarks
Commit Name: ce2c2d1926f26813e7d4da5fa7bbb82492c05114
Time: 2016-09-21
Author: marcus.edel@fu-berlin.de
File Name: util/database.py
Class Name: Database
Method Name: NewBuild
Project Name: mlpack/benchmarks
Commit Name: ce2c2d1926f26813e7d4da5fa7bbb82492c05114
Time: 2016-09-21
Author: marcus.edel@fu-berlin.de
File Name: util/database.py
Class Name: Database
Method Name: NewDataset