Default constructor
| 64 | |
| 65 | // Default constructor |
| 66 | UserTable::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. |
nothing calls this directly
no test coverage detected