MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / tableExists

Method tableExists

Source/3rdParty/sqlite/SQLiteCpp/Database.cpp:132–138  ·  view source on GitHub ↗

Shortcut to test if a table exists.

Source from the content-addressed store, hash-verified

130
131// Shortcut to test if a table exists.
132bool 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.
141int64_t Database::getLastInsertRowid() const noexcept

Callers

nothing calls this directly

Calls 4

getColumnMethod · 0.80
bindMethod · 0.65
executeStepMethod · 0.45
getIntMethod · 0.45

Tested by

no test coverage detected