pub fn sqlite_row_to_json(row: HashMap<String, Value>) -> Result<Value>Expand description
Convert a SQLite row (HashMap) to JSON object
Converts all column values to JSON and returns a JSON object with column names as keys.
§Arguments
row- HashMap of column_name → SQLite value
§Returns
JSON object ready for JSONB storage
§Examples
let mut row = HashMap::new();
row.insert("id".to_string(), Value::Integer(1));
row.insert("name".to_string(), Value::Text("Alice".to_string()));
let json = sqlite_row_to_json(row).unwrap();
assert_eq!(json["id"], 1);
assert_eq!(json["name"], "Alice");