MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / tableExists

Method tableExists

src/openms/source/FORMAT/SqliteConnector.cpp:79–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 }
78
79 bool SqliteConnector::tableExists(sqlite3 *db, const String& tablename)
80 {
81 sqlite3_stmt* stmt;
82 prepareStatement(db, &stmt, "SELECT 1 FROM sqlite_master WHERE type='table' AND name='" + tablename + "';");
83
84 sqlite3_step(stmt);
85 // if we get a row back, the table exists:
86 bool found = (sqlite3_column_type(stmt, 0) != SQLITE_NULL);
87 sqlite3_finalize(stmt);
88
89 return found;
90 }
91
92 Size SqliteConnector::countTableRows(const String& table_name)
93 {

Callers 15

loadScoreTypes_Method · 0.80
loadInputFiles_Method · 0.80
prepareQueryMetaInfo_Method · 0.80
loadDBSearchParams_Method · 0.80
loadProcessingSteps_Method · 0.80
loadObservations_Method · 0.80
loadParentSequences_Method · 0.80
loadParentGroupSets_Method · 0.80

Calls 1

prepareStatementFunction · 0.85

Tested by

no test coverage detected