Shortcut to test if a table exists.
| 130 | |
| 131 | // Shortcut to test if a table exists. |
| 132 | bool Database::tableExists(const char* apTableName) const |
| 133 | { |
| 134 | Statement query(*this, "SELECT count(*) FROM sqlite_master WHERE type='table' AND name=?"); |
| 135 | query.bind(1, apTableName); |
| 136 | (void)query.executeStep(); // Cannot return false, as the above query always return a result |
| 137 | return (1 == query.getColumn(0).getInt()); |
| 138 | } |
| 139 | |
| 140 | // Get the rowid of the most recent successful INSERT into the database from the current connection. |
| 141 | int64_t Database::getLastInsertRowid() const noexcept |
nothing calls this directly
no test coverage detected