File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export interface Options {
88 timeout ?: number
99 authToken ?: string
1010 syncUrl ?: string
11+ readYourWrites ?: boolean
1112 syncPeriod ?: number
1213 encryptionCipher ?: string
1314 encryptionKey ?: string
Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ pub struct Options {
190190 pub authToken : Option < String > ,
191191 // URL for remote database sync.
192192 pub syncUrl : Option < String > ,
193+ // Read your writes.
194+ pub readYourWrites : Option < bool > ,
193195 // Sync interval in seconds.
194196 pub syncPeriod : Option < f64 > ,
195197 // Encryption cipher for local enryption at rest.
@@ -286,6 +288,9 @@ impl Database {
286288 let mut builder =
287289 libsql:: Builder :: new_remote_replica ( path. clone ( ) , sync_url. clone ( ) , auth_token) ;
288290
291+ let read_your_writes = options. readYourWrites . unwrap_or ( true ) ;
292+ builder = builder. read_your_writes ( read_your_writes) ;
293+
289294 if encryption_key. len ( ) > 0 {
290295 let encryption_config =
291296 libsql:: EncryptionConfig :: new ( cipher, encryption_key. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments