Class MDSQLiteAdapter
public class MDSQLiteAdapter : IDBAdapter, ILockContext, IDBGetUtils, ICloseableAsync
- Inheritance
-
MDSQLiteAdapter
- Implements
- Inherited Members
Constructors
Fields
Properties
- Events
The event manager for the adapter.
- Name
The name of the adapter.
Methods
- Close()
Closes the adapter.
- 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, ordefault(T)if there are no rows. Note thatdefault(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, ordefault(T)if there are no rows. Note thatdefault(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.
- LoadDefaultPowerSyncExtension(SqliteConnection)
Loads the bundled PowerSync core SQLite extension. Override on platform-specific adapters where the native library lives outside the standard runtimes path.
- ReadLock<T>(Func<ILockContext, Task<T>>, DBLockOptions?)
Executes a read lock with the given function.
- ReadTransaction<T>(Func<ITransaction, Task<T>>, DBLockOptions?)
Executes a read transaction with the given function.
- RefreshSchema()
This method refreshes the schema information across all connections. This is for advanced use cases, and should generally not be needed.
- WriteLock(Func<ILockContext, Task>, DBLockOptions?)
Executes a write lock with the given function.
- WriteLock<T>(Func<ILockContext, Task<T>>, DBLockOptions?)
Executes a write lock with the given function.
- WriteTransaction(Func<ITransaction, Task>, DBLockOptions?)
Executes a write transaction with the given function.
- WriteTransaction<T>(Func<ITransaction, Task<T>>, DBLockOptions?)
Executes a write transaction with the given function.