Table of Contents

Method WriteLock

Namespace
PowerSync.Common.MDSQLite
Assembly
PowerSync.Common.dll

WriteLock(Func<ILockContext, Task>, DBLockOptions?)

Executes a write lock with the given function.

public Task WriteLock(Func<ILockContext, Task> fn, DBLockOptions? options = null)

Parameters

fn Func<ILockContext, Task>
options DBLockOptions

Returns

Task

WriteLock<T>(Func<ILockContext, Task<T>>, DBLockOptions?)

Executes a write lock with the given function.

public Task<T> WriteLock<T>(Func<ILockContext, Task<T>> fn, DBLockOptions? options = null)

Parameters

fn Func<ILockContext, Task<T>>
options DBLockOptions

Returns

Task<T>

Type Parameters

T

Remarks

This is an overload of WriteLock(Func<ILockContext, Task>, DBLockOptions?) that allows the function to return a result.