Definition
Assembly: CloudNimble.BlazorEssentials.TursoDb.dll Namespace: CloudNimble.BlazorEssentials.TursoDb Inheritance: CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Summary
Base class for sync-enabled Turso databases. Extends TursoDatabase with Turso Cloud synchronization capabilities (pull, push, sync).Examples
Constructors
.ctor Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
jsRuntime | Microsoft.JSInterop.IJSRuntime | The JavaScript runtime for interop. |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when jsRuntime is null. |
.ctor Inherited
Inherited from
objectSyntax
Properties
AuthToken Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:string?
AutoCreateSchema Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:bool
DbSets Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:System.Collections.Generic.List<CloudNimble.BlazorEssentials.TursoDb.ITursoDbSet>
EncryptionEnabled
Gets or sets whether encryption is enabled for the local database.Syntax
Property Value
Type:bool
EncryptionKey
Gets or sets the encryption key for the local database.Syntax
Property Value
Type:string?
IsConnected Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:bool
IsSyncing
Gets whether a sync operation is currently in progress.Syntax
Property Value
Type:bool
Name Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:string
SyncAuthToken
Gets or sets the authentication token for Turso Cloud sync.Syntax
Property Value
Type:string
SyncIntervalMs
Gets or sets the sync interval in milliseconds. Set to 0 to disable automatic periodic sync. Default is 0.Syntax
Property Value
Type:int
SyncOnConnect
Gets or sets whether to sync on connect. Default is true.Syntax
Property Value
Type:bool
SyncUrl
Gets or sets the sync URL for Turso Cloud. This is typically in the format: libsql://[database-name]-[org-name].turso.ioSyntax
Property Value
Type:string
Url Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Property Value
Type:string
Methods
BeginTransactionAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Returns
Type:System.Threading.Tasks.Task<CloudNimble.BlazorEssentials.TursoDb.TursoTransaction>
A transaction that can be committed or rolled back.
Examples
CallJavaScriptAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
functionName | string | - |
args | object?[] | - |
Returns
Type:System.Threading.Tasks.Task
CallJavaScriptAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
functionName | string | - |
args | object?[] | - |
Returns
Type:System.Threading.Tasks.Task<TResult>
ConnectAsync
Connects to the database with sync support. If TursoSyncDatabase.SyncOnConnect is true, performs an initial sync after connecting.Syntax
Returns
Type:System.Threading.Tasks.Task
ConnectAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Returns
Type:System.Threading.Tasks.Task
A task representing the asynchronous operation.
DisconnectAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Returns
Type:System.Threading.Tasks.Task
A task representing the asynchronous operation.
DisposeAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Returns
Type:System.Threading.Tasks.ValueTask
EnsureConnectedAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Returns
Type:System.Threading.Tasks.Task
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ExecuteAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
sql | string | The SQL statement to execute. |
parameters | object?[] | The parameters for the SQL statement. |
Returns
Type:System.Threading.Tasks.Task<CloudNimble.BlazorEssentials.TursoDb.TursoResult>
The execution result.
ExecuteBatchAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
statements | (string, object?[])[] | The statements to execute. |
Returns
Type:System.Threading.Tasks.Task<System.Collections.Generic.List<CloudNimble.BlazorEssentials.TursoDb.TursoResult>>
The results of each statement.
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
Prepare Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
sql | string | The SQL query to prepare. |
Returns
Type:CloudNimble.BlazorEssentials.TursoDb.TursoPreparedStatement<TResult>
A prepared statement that can be executed multiple times.
Type Parameters
TResult- The type of result returned by the query.
Prepare Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
sql | string | The SQL command to prepare. |
Returns
Type:CloudNimble.BlazorEssentials.TursoDb.TursoPreparedStatement
A prepared statement that can be executed multiple times.
PullAsync
Pulls changes from Turso Cloud to the local database. This downloads any changes made on other devices or the cloud.Syntax
Returns
Type:System.Threading.Tasks.Task<CloudNimble.BlazorEssentials.TursoDb.TursoSyncResult>
The sync result containing the number of frames synced.
PushAsync
Pushes local changes to Turso Cloud. This uploads any local changes to the cloud for other devices to sync.Syntax
Returns
Type:System.Threading.Tasks.Task<CloudNimble.BlazorEssentials.TursoDb.TursoSyncResult>
The sync result containing the number of frames synced.
QueryAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
sql | string | The SQL query to execute. |
parameters | object?[] | The parameters for the SQL query. |
Returns
Type:System.Threading.Tasks.Task<System.Collections.Generic.List<T>>
A list of results.
Type Parameters
T- The type to deserialize results into.
QuerySingleAsync Inherited
Inherited from
CloudNimble.BlazorEssentials.TursoDb.TursoDatabaseSyntax
Parameters
| Name | Type | Description |
|---|---|---|
sql | string | The SQL query to execute. |
parameters | object?[] | The parameters for the SQL query. |
Returns
Type:System.Threading.Tasks.Task<T?>
The first result or default.
Type Parameters
T- The type to deserialize the result into.
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
SyncAsync
Performs a bidirectional sync with Turso Cloud. This combines pull and push operations.Syntax
Returns
Type:System.Threading.Tasks.Task<CloudNimble.BlazorEssentials.TursoDb.TursoSyncResult>
The sync result containing the number of frames synced.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Events
SyncCompleted
Occurs when a sync operation completes successfully.Syntax
SyncFailed
Occurs when a sync operation fails.Syntax
SyncStarted
Occurs when a sync operation starts.Syntax
Related APIs
- System.IAsyncDisposable