sqlite3_open
Opens a connection to a database file. If the file does not exist it is created.
Path to the database file. Pass
":memory:" to open an in-memory database.Output pointer that receives the database connection handle. Always set, even on error — call
sqlite3_close() to release it.SQLITE_OK on success, or an error code. Call sqlite3_errmsg() for a description of the error.
sqlite3_open_v2
Like sqlite3_open, but accepts flags and a VFS name.
Path to the database file or
":memory:".Output pointer for the connection handle.
Open mode flags. The
_flags parameter is accepted but currently treated as advisory — Turso opens the database according to its own defaults.Name of the VFS to use, or
NULL for the default.int — SQLITE_OK on success.
sqlite3_close
Closes a database connection and releases all associated resources. All prepared statements must be finalized before calling this function.
The database connection to close.
SQLITE_OK, or SQLITE_BUSY if there are unfinalized statements.
sqlite3_errmsg
Returns a human-readable description of the most recent error on the connection.
The database connection.
const char * — a null-terminated UTF-8 string. The pointer is valid until the next API call on db.
sqlite3_errcode
Returns the numeric error code of the most recent error on the connection.
The database connection.
int — one of the SQLITE_* result code constants.