Divooka.Database.SQLite
Divooka.Database.SQLite.SQLiteHelper
Static façade for common SQLite tasks – loosely patterned on
PostgreSQLHelper.
Divooka.Database.SQLite.SQLiteHelper.SQLiteConfiguration
Remarks
Encapsulates connection-string construction for SQLite.
Default is an **in-memory** database; simply point Divooka.Database.SQLite.SQLiteHelper.SQLiteConfiguration.DataSource
at a file path for a persistent DB.
Divooka.Database.SQLite.SQLiteHelper.SQLiteConfiguration.DataSource
File path (or
:memory:).
Divooka.Database.SQLite.SQLiteHelper.SQLiteConfiguration.ReadOnly
Open in read-only mode (fails if file does not exist).
Divooka.Database.SQLite.SQLiteHelper.SQLiteConfiguration.ConnectionString
Full connection string built with Microsoft.Data.Sqlite.SqliteConnectionStringBuilder.
Divooka.Database.SQLite.SQLiteHelper.GetTables()
Returns
sqlite_master rows for user-defined tables
(name, sql, etc.).
Divooka.Database.SQLite.SQLiteHelper.GetTableSchema()
Returns
Result of
PRAGMA table_info('{tableName}').
Divooka.Database.SQLite.SQLiteHelper.GetIndexes()
Lists indexes for a table via
PRAGMA index_list.
Divooka.Database.SQLite.SQLiteHelper.GetCreateTableCommand()
Gets the full CREATE-TABLE statement that was used to build
tableName.
Returns
null if the table does not exist.
Divooka.Database.SQLite.SQLiteHelper.CreateTable()
Remarks
Automatically picks INTEGER PRIMARY KEY AUTOINCREMENT when there is exactly one numeric primary key.
Uses Divooka.Database.SQLite.SQLiteHelper.MapDotNetTypeToSQLiteType().