1#ifndef ZSERIO_VALIDATION_SQLITE_UTIL_H_INC
2#define ZSERIO_VALIDATION_SQLITE_UTIL_H_INC
16template <
typename ALLOC>
20 using Statement = std::unique_ptr<sqlite3_stmt, SqliteFinalizer>;
33 using TableSchema = std::map<StringType, ColumnDescription, std::less<StringType>,
64 throw SqliteException(
"ValidationSqliteUtils.getNumberOfTableRows: sqlite3_step() failed: ")
111 throw SqliteException(
"ValidationSqliteUtils.getTableSchema: sqlite3_step() failed: ")
sqlite3_stmt * prepareStatement(std::string_view sqlQuery)
static const char * sqliteColumnTypeName(int columnType)
static bool isColumnInTable(SqliteConnection &connection, std::string_view attachedDbName, std::string_view tableName, std::string_view columnName, const ALLOC &allocator)
BasicString< RebindAlloc< ALLOC, char > > StringType
static size_t getNumberOfTableRows(SqliteConnection &connection, std::string_view attachedDbName, std::string_view tableName, const ALLOC &allocator)
static void getTableSchema(SqliteConnection &connection, std::string_view attachedDbName, std::string_view tableName, TableSchema &tableSchema, const ALLOC &allocator)
std::map< StringType, ColumnDescription, std::less< StringType >, RebindAlloc< ALLOC, std::pair< const StringType, ColumnDescription > > > TableSchema
std::unique_ptr< sqlite3_stmt, SqliteFinalizer > Statement