improve sync engine

This commit is contained in:
Nikita Sivukhin
2025-08-27 15:29:30 +04:00
parent 30c5473151
commit 009aa479bf
21 changed files with 2482 additions and 1389 deletions

View File

@@ -15,6 +15,7 @@ pub enum JsProtocolRequest {
method: String,
path: String,
body: Option<Vec<u8>>,
headers: Vec<(String, String)>,
},
FullRead {
path: String,
@@ -130,11 +131,16 @@ impl ProtocolIO for JsProtocolIo {
method: &str,
path: &str,
body: Option<Vec<u8>>,
headers: &[(&str, &str)],
) -> turso_sync_engine::Result<JsDataCompletion> {
Ok(self.add_request(JsProtocolRequest::Http {
method: method.to_string(),
path: path.to_string(),
body,
headers: headers
.iter()
.map(|x| (x.0.to_string(), x.1.to_string()))
.collect(),
}))
}