Merge branch 'tursodatabase:main' into main

This commit is contained in:
Preston Thorpe
2025-03-16 21:47:20 -04:00
committed by GitHub
4 changed files with 1238 additions and 442 deletions

View File

@@ -108,3 +108,7 @@ harness = false
[[bench]]
name = "mvcc_benchmark"
harness = false
[[bench]]
name = "json_benchmark"
harness = false

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -75,7 +75,7 @@ pub fn get_json(json_value: &OwnedValue, indent: Option<&str>) -> crate::Result<
pub fn jsonb(json_value: &OwnedValue) -> crate::Result<OwnedValue> {
let jsonbin = match json_value {
OwnedValue::Null | OwnedValue::Integer(_) | OwnedValue::Float(_) | OwnedValue::Text(_) => {
Jsonb::from_str(&json_value.to_string())
Jsonb::from_str(&json_value.to_text().unwrap())
}
OwnedValue::Blob(blob) => {
let blob = Jsonb::new(blob.len(), Some(&blob));