Update sqlite3 c binding to use the new retrieval methods to access Record values.

This commit is contained in:
Tiago Ribeiro 2025-02-10 00:21:42 -07:00
parent 7867e54110
commit d807b533f7
No known key found for this signature in database
GPG key ID: 0FC904500625FBE9

View file

@ -442,7 +442,7 @@ pub unsafe extern "C" fn sqlite3_expanded_sql(_stmt: *mut sqlite3_stmt) -> *mut
pub unsafe extern "C" fn sqlite3_data_count(stmt: *mut sqlite3_stmt) -> ffi::c_int {
let stmt = &*stmt;
let row = stmt.stmt.row().unwrap();
row.values.len() as ffi::c_int
row.len() as ffi::c_int
}
#[no_mangle]
@ -635,7 +635,7 @@ pub unsafe extern "C" fn sqlite3_column_text(
Some(row) => row,
None => return std::ptr::null(),
};
match row.values.get(idx as usize).map(|v| v.to_value()) {
match row.get_values().get(idx as usize).map(|v| v.to_value()) {
Some(limbo_core::Value::Text(text)) => text.as_bytes().as_ptr(),
_ => std::ptr::null(),
}