replace wal_frames_count with wal_state method which return both frames count and checkpoint sequence

This commit is contained in:
Nikita Sivukhin
2025-08-21 15:11:15 +04:00
parent 25cb28da67
commit 69c39d5d8c
5 changed files with 24 additions and 10 deletions

View File

@@ -1404,8 +1404,8 @@ pub unsafe extern "C" fn libsql_wal_frame_count(
}
let db: &mut sqlite3 = &mut *db;
let db = db.inner.lock().unwrap();
let frame_count = match db.conn.wal_frame_count() {
Ok(count) => count as u32,
let frame_count = match db.conn.wal_state() {
Ok(state) => state.max_frame as u32,
Err(_) => return SQLITE_ERROR,
};
*p_frame_count = frame_count;