summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3_finalize.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man3/sqlite3_finalize.3')
-rw-r--r--static/netbsd/man3/sqlite3_finalize.346
1 files changed, 46 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_finalize.3 b/static/netbsd/man3/sqlite3_finalize.3
new file mode 100644
index 00000000..ead471e1
--- /dev/null
+++ b/static/netbsd/man3/sqlite3_finalize.3
@@ -0,0 +1,46 @@
+.Dd January 24, 2024
+.Dt SQLITE3_FINALIZE 3
+.Os
+.Sh NAME
+.Nm sqlite3_finalize
+.Nd destroy a prepared statement object
+.Sh SYNOPSIS
+.In sqlite3.h
+.Ft int
+.Fo sqlite3_finalize
+.Fa "sqlite3_stmt *pStmt"
+.Fc
+.Sh DESCRIPTION
+The sqlite3_finalize() function is called to delete a prepared statement.
+If the most recent evaluation of the statement encountered no errors
+or if the statement is never been evaluated, then sqlite3_finalize()
+returns SQLITE_OK.
+If the most recent evaluation of statement S failed, then sqlite3_finalize(S)
+returns the appropriate error code or extended error code.
+.Pp
+The sqlite3_finalize(S) routine can be called at any point during the
+life cycle of prepared statement S: before statement
+S is ever evaluated, after one or more calls to
+.Fn sqlite3_reset ,
+or after any call to
+.Fn sqlite3_step
+regardless of whether or not the statement has completed execution.
+.Pp
+Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+.Pp
+The application must finalize every prepared statement
+in order to avoid resource leaks.
+It is a grievous error for the application to try to use a prepared
+statement after it has been finalized.
+Any use of a prepared statement after it has been finalized can result
+in undefined and undesirable behavior such as segfaults and heap corruption.
+.Sh IMPLEMENTATION NOTES
+These declarations were extracted from the
+interface documentation at line 5265.
+.Bd -literal
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
+.Ed
+.Sh SEE ALSO
+.Xr sqlite3_reset 3 ,
+.Xr sqlite3_step 3 ,
+.Xr sqlite3_stmt 3