MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / DataStore

Method DataStore

sql/datastore.cpp:39–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37#define UPDATE_SEQUENCE_NUMBER 4;
38
39DataStore::DataStore(DatabaseConnection *db)
40{
41 this->db = db;
42 db->lockForRead();
43 // Check if the table exists. If not, create it.
44 NSqlQuery sql(db);
45 sql.exec("Select * from sqlite_master where type='table' and name='DataStore';");
46 if (!sql.next()) {
47 db->unlock();
48 this->createTable();
49 }
50 this->setTable("DataStore");
51 this->select();
52 this->setEditStrategy(QSqlTableModel::OnFieldChange);
53 sql.finish();
54 db->unlock();
55}
56
57
58//* Create the NoteTable table.

Callers

nothing calls this directly

Calls 4

createTableMethod · 0.95
lockForReadMethod · 0.80
execMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected