JSON kernel name propogation and stats

Change-Id: I60cf4c7608272941e2499bd251850416ac254f32
Tento commit je obsažen v:
Evgeny
2020-02-25 20:09:45 -06:00
rodič 40730e34e4
revize a5f52b40f5
6 změnil soubory, kde provedl 101 přidání a 53 odebrání
+5 -2
Zobrazit soubor
@@ -69,6 +69,9 @@ class SQLiteDB:
cursor.execute('ALTER TABLE %s ADD COLUMN "%s" %s' % (table_name, data_label, data_type))
cursor.execute('UPDATE %s SET %s = (%s);' % (table_name, data_label, data_expr))
def change_rec_name(self, table_name, rec_id, rec_name):
self.connection.execute('UPDATE ' + table_name + ' SET Name = ? WHERE "Index" = ?', (rec_name, rec_id))
# populate DB table entry
def insert_entry(self, table, val_list):
(cursor, stm) = table
@@ -98,8 +101,8 @@ class SQLiteDB:
def _get_raws_indexed(self, table_name):
cursor = self.connection.execute('SELECT * FROM ' + table_name + ' order by "Index" asc;')
return cursor.fetchall()
def _get_raw_by_id(self, table_name, req_id):
cursor = self.connection.execute('SELECT * FROM ' + table_name + ' WHERE "Index"=?', (req_id,))
def _get_raw_by_id(self, table_name, rec_id):
cursor = self.connection.execute('SELECT * FROM ' + table_name + ' WHERE "Index"=?', (rec_id,))
raws = cursor.fetchall()
if len(raws) != 1:
raise Exception('Index is not unique, table "' + table_name + '"')