summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3_db_cacheflush.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man3/sqlite3_db_cacheflush.3')
-rw-r--r--static/netbsd/man3/sqlite3_db_cacheflush.356
1 files changed, 56 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_db_cacheflush.3 b/static/netbsd/man3/sqlite3_db_cacheflush.3
new file mode 100644
index 00000000..8f1cecdf
--- /dev/null
+++ b/static/netbsd/man3/sqlite3_db_cacheflush.3
@@ -0,0 +1,56 @@
+.Dd January 24, 2024
+.Dt SQLITE3_DB_CACHEFLUSH 3
+.Os
+.Sh NAME
+.Nm sqlite3_db_cacheflush
+.Nd flush caches to disk mid-transaction
+.Sh SYNOPSIS
+.In sqlite3.h
+.Ft int
+.Fo sqlite3_db_cacheflush
+.Fa "sqlite3*"
+.Fc
+.Sh DESCRIPTION
+If a write-transaction is open on database connection
+D when the sqlite3_db_cacheflush(D) interface
+invoked, any dirty pages in the pager-cache that are not currently
+in use are written out to disk.
+A dirty page may be in use if a database cursor created by an active
+SQL statement is reading from it, or if it is page 1 of a database
+file (page 1 is always "in use").
+The sqlite3_db_cacheflush(D) interface flushes
+caches for all schemas - "main", "temp", and any attached databases.
+.Pp
+If this function needs to obtain extra database locks before dirty
+pages can be flushed to disk, it does so.
+If those locks cannot be obtained immediately and there is a busy-handler
+callback configured, it is invoked in the usual manner.
+If the required lock still cannot be obtained, then the database is
+skipped and an attempt made to flush any dirty pages belonging to the
+next (if any) database.
+If any databases are skipped because locks cannot be obtained, but
+no other error occurs, this function returns SQLITE_BUSY.
+.Pp
+If any other error occurs while flushing dirty pages to disk (for example
+an IO error or out-of-memory condition), then processing is abandoned
+and an SQLite error code is returned to the caller immediately.
+.Pp
+Otherwise, if no error occurs,
+.Fn sqlite3_db_cacheflush
+returns SQLITE_OK.
+.Pp
+This function does not set the database handle error code or message
+returned by the
+.Fn sqlite3_errcode
+and
+.Fn sqlite3_errmsg
+functions.
+.Sh IMPLEMENTATION NOTES
+These declarations were extracted from the
+interface documentation at line 10283.
+.Bd -literal
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
+.Ed
+.Sh SEE ALSO
+.Xr sqlite3 3 ,
+.Xr sqlite3_errcode 3