mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-28 05:24:22 +01:00
35 lines
803 B
Markdown
35 lines
803 B
Markdown
# Limbo Documentation
|
|
|
|
## SQLite C API
|
|
|
|
### WAL manipulation
|
|
|
|
#### `libsql_wal_frame_count`
|
|
|
|
Get the number of frames in the WAL.
|
|
|
|
**Synopsis:**
|
|
|
|
```c
|
|
int libsql_wal_frame_count(sqlite3 *db, uint32_t *p_frame_count);
|
|
```
|
|
|
|
**Description:**
|
|
|
|
The `libsql_wal_frame_count` function returns the number of frames in the WAL
|
|
in the `p_frame_count` parameter.
|
|
|
|
**Return Values:**
|
|
|
|
* `SQLITE_OK` if the number of frames in the WAL file is successfully returned.
|
|
* `SQLITE_MISUSE` if the `db` is NULL.
|
|
* SQLITE_ERROR if an error occurs while getting the number of frames in the WAL
|
|
file.
|
|
|
|
**Safety Requirements:**
|
|
|
|
* The `db` parameter must be a valid pointer to a `sqlite3` database
|
|
connection.
|
|
* The `p_frame_count` must be a valid pointer to a `u32` that will store the
|
|
* number of frames in the WAL file.
|