ce2c2d1926f26813e7d4da5fa7bbb82492c05114,util/database.py,Database,NewDataset,#Database#,285
Before Change
"""
def NewDataset(self, name, size, attributes, instances, datasetType="real"):
with self.con:
self.cur.execute("INSERT INTO datasets VALUES (NULL,?,?,?,?,?)",
(name, size, attributes, instances, datasetType))
self.cur.execute("SELECT last_insert_rowid()")
return self.cur.fetchall()[0][0]
"""
Get the informations of the given dataset.
After Change
"""
def NewDataset(self, name, size, attributes, instances, datasetType="real"):
with self.con:
command = "INSERT INTO datasets VALUES (NULL,%s,%s,%s,%s,%s)"
if self.driver == "mysql":
self.cur.execute(command,
(name, size, attributes, instances, datasetType))
self.cur.execute("SELECT LAST_INSERT_ID()")
elif self.driver == "sqlite":
self.cur.execute(command % ("?", "?", "?", "?", "?"),
(name, size, attributes, instances, datasetType))
self.cur.execute("SELECT last_insert_rowid()")
return self.cur.fetchall()[0][0]
"""
Get the informations of the given dataset.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
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: NewDataset
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