File tree 1 file changed +7
-2
lines changed
Sources/PowerSync/Protocol
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,17 @@ public protocol Queries {
62
62
options: WatchOptions < RowType >
63
63
) throws -> AsyncThrowingStream < [ RowType ] , Error >
64
64
65
- /// Execute a write transaction with the given callback
65
+ /// Takes a global lock, without starting a transaction.
66
+ ///
67
+ /// In most cases, [writeTransaction] should be used instead.
66
68
func writeLock< R> (
67
69
callback: @escaping ( any ConnectionContext ) throws -> R
68
70
) async throws -> R
69
71
70
- /// Execute a read transaction with the given callback
72
+ /// Takes a read lock, without starting a transaction.
73
+ ///
74
+ /// The lock only applies to a single connection, and multiple
75
+ /// connections may hold read locks at the same time.
71
76
func readLock< R> (
72
77
callback: @escaping ( any ConnectionContext ) throws -> R
73
78
) async throws -> R
You can’t perform that action at this time.
0 commit comments