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

Method UserTable

sql/usertable.cpp:66–78  ·  view source on GitHub ↗

Default constructor

Source from the content-addressed store, hash-verified

64
65// Default constructor
66UserTable::UserTable(DatabaseConnection *db)
67{
68 this->db = db;
69 // Check if the table exists. If not, create it.
70 NSqlQuery sql(db);
71 db->lockForRead();
72 sql.exec("Select * from sqlite_master where type='table' and name='UserTable';");
73 if (!sql.next()) {
74 db->unlock();
75 this->createTable();
76 } else
77 db->unlock();
78}
79
80
81//* 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