Logo ProcessCore

SqliteDriver Type

.NET-side ISqliteDriver implementation backed by Microsoft.Data.Sqlite.

Construction is private; obtain instances through the named-parameter factory members (create, createFromFile, createInMemory, wrapConnection) or via the convenience Sqlite module. The factories all open the underlying SqliteConnection if it is not already open and enable the foreign_keys pragma — SQLite does not enforce foreign keys by default.

The driver tracks whether it owns the connection. Connections opened by a factory are owned and disposed when the driver is disposed; connections passed to wrapConnection are borrowed and outlive the driver.

Instance members

Instance member Description

this.Connection

Full Usage: this.Connection

Returns: SqliteConnection

The underlying SqliteConnection, exposed for advanced scenarios such as transactions or backup.

Returns: SqliteConnection

Static members

Static member Description

SqliteDriver.create ConnectionString

Full Usage: SqliteDriver.create ConnectionString

Parameters:
    ConnectionString : string - An ADO.NET connection string for Microsoft.Data.Sqlite.

Returns: SqliteDriver

Creates a driver from a raw ADO.NET connection string and opens the connection. The resulting driver owns the connection.

ConnectionString : string

An ADO.NET connection string for Microsoft.Data.Sqlite.

Returns: SqliteDriver

SqliteDriver.createFromFile Path

Full Usage: SqliteDriver.createFromFile Path

Parameters:
    Path : string - File-system path to the SQLite database file.

Returns: SqliteDriver

Creates a driver pointing at a database file. Equivalent to create with a connection string of Data Source={Path}.

Path : string

File-system path to the SQLite database file.

Returns: SqliteDriver

SqliteDriver.createInMemory ()

Full Usage: SqliteDriver.createInMemory ()

Returns: SqliteDriver

Creates a driver backed by an in-memory database (Data Source=:memory:).

Returns: SqliteDriver

SqliteDriver.wrapConnection Connection

Full Usage: SqliteDriver.wrapConnection Connection

Parameters:
Returns: SqliteDriver

Wraps an existing SqliteConnection. Opens the connection if it is not already open. The resulting driver does not own the connection — disposing the driver will not close it.

Connection : SqliteConnection

The connection to wrap.

Returns: SqliteDriver

Type something to start searching.