|
Zserio C++17 runtime library 1.3.0
Built for Zserio 2.20.0
|
#include <ValidationSqliteUtil.h>
Classes | |
| struct | ColumnDescription |
Public Types | |
| using | StringType = BasicString< RebindAlloc< ALLOC, char > > |
| using | Statement = std::unique_ptr< sqlite3_stmt, SqliteFinalizer > |
| using | TableSchema = std::map< StringType, ColumnDescription, std::less< StringType >, RebindAlloc< ALLOC, std::pair< const StringType, ColumnDescription > > > |
Static Public Member Functions | |
| 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) |
| static bool | isColumnInTable (SqliteConnection &connection, std::string_view attachedDbName, std::string_view tableName, std::string_view columnName, const ALLOC &allocator) |
| static const char * | sqliteColumnTypeName (int columnType) |
Sqlite utility for validation.
Definition at line 17 of file ValidationSqliteUtil.h.
| using zserio::ValidationSqliteUtil< ALLOC >::Statement = std::unique_ptr<sqlite3_stmt, SqliteFinalizer> |
Definition at line 20 of file ValidationSqliteUtil.h.
| using zserio::ValidationSqliteUtil< ALLOC >::StringType = BasicString<RebindAlloc<ALLOC, char> > |
Definition at line 19 of file ValidationSqliteUtil.h.
| using zserio::ValidationSqliteUtil< ALLOC >::TableSchema = std::map<StringType, ColumnDescription, std::less<StringType>, RebindAlloc<ALLOC, std::pair<const StringType, ColumnDescription> >> |
Definition at line 33 of file ValidationSqliteUtil.h.
|
inlinestatic |
Gets number of rows in the given SQLite table.
| connection | Database connection to use. |
| attachedDbName | Attached database name if table is relocated in different database. |
| tableName | Name of the table to get column types of. |
| allocator | Allocator to use for the query string composition. |
| SqliteException | if the table does not exist. |
Definition at line 48 of file ValidationSqliteUtil.h.
|
inlinestatic |
Gets a map of column names to column description for given SQLite table.
| connection | Database connection to use. |
| attachedDbName | Attached database name if table is relocated in different database. |
| tableName | Name of the table to get column types of. |
| tableSchema | Schema to fill. |
| allocator | Allocator to use for the query string composition. |
Definition at line 80 of file ValidationSqliteUtil.h.
|
inlinestatic |
Check if the column is present in the given SQLite table. Note that this method also detect hidden SQLite columns, which are not visible using standard PRAGMA table_info query.
| connection | Database connection to use. |
| attachedDbName | Attached database name if table is relocated in different database. |
| tableName | Name of the table to get column types of. |
| columnName | Name of the column to check. |
| allocator | Allocator to use for the query string composition. |
Definition at line 129 of file ValidationSqliteUtil.h.
|
inlinestatic |
Gets name of the given SQLite column type.
| columnType | SQLite column type. |
Definition at line 163 of file ValidationSqliteUtil.h.