File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,15 @@ fn _connect_core(
130130 match sync_url {
131131 Some ( sync_url) => {
132132 let sync_interval = sync_interval. map ( |i| std:: time:: Duration :: from_secs_f64 ( i) ) ;
133- let fut = libsql :: Database :: open_with_remote_sync_internal (
134- database,
135- sync_url ,
136- auth_token ,
137- Some ( ver ) ,
138- true ,
139- encryption_config ,
140- sync_interval ,
141- ) ;
133+ let mut builder =
134+ libsql :: Builder :: new_remote_replica ( database, sync_url , auth_token . to_string ( ) ) ;
135+ if let Some ( encryption_config ) = encryption_config {
136+ builder = builder . encryption_config ( encryption_config ) ;
137+ }
138+ if let Some ( sync_interval ) = sync_interval {
139+ builder = builder . sync_interval ( sync_interval ) ;
140+ }
141+ let fut = builder . build ( ) ;
142142 tokio:: pin!( fut) ;
143143 let result = rt. block_on ( check_signals ( py, fut) ) ;
144144 result. map_err ( to_py_err) ?
You can’t perform that action at this time.
0 commit comments