Table of Contents

Class MDSQLiteConnection

Namespace
PowerSync.Common.MDSQLite
Assembly
PowerSync.Common.dll
public class MDSQLiteConnection : EventStream<DBAdapterEvents.TablesUpdatedEvent>, IEventStream<DBAdapterEvents.TablesUpdatedEvent>, ICloseable, ILockContext, IDBGetUtils
Inheritance
MDSQLiteConnection
Implements
Inherited Members

Constructors

MDSQLiteConnection(MDSQLiteConnectionOptions)

Fields

Db

Methods

Close()
ConsumeUpdates()
EmitUpdates(HashSet<string>)
Execute(string, object?[]?)
ExecuteBatch(string, object?[][]?)
Get(string, object?[]?)

Executes a read-only query and returns the first row. Throws if there are no rows.

GetAll(string, object?[]?)

Executes a read-only query and returns all rows.

GetAll<T>(string, object?[]?)

Executes a read-only query and returns all rows, mapped using T.FromRow.

GetAll<T>(string, object?[]?, SqlMapper<T>)

Executes a read-only query and returns all rows, mapped using mapper.

GetOptional(string, object?[]?)

Executes a read-only query and returns the first row, or null if there are no rows.

GetOptional<T>(string, object?[]?)

Executes a read-only query and returns the first row mapped using T.FromRow, or default(T) if there are no rows. Note that default(T) is not null if T is a value type.

GetOptional<T>(string, object?[]?, SqlMapper<T>)

Executes a read-only query and returns the first row mapped using mapper, or default(T) if there are no rows. Note that default(T) is not null for all types. Map to a nullable type (e.g. row => (long?)row.GetLong("id")) to ensure you get null.

Get<T>(string, object?[]?)

Executes a read-only query and returns the first row mapped using T.FromRow. Throws if there are no rows.

Get<T>(string, object?[]?, SqlMapper<T>)

Executes a read-only query and returns the first row mapped using mapper. Throws if there are no rows.

RefreshSchema()