summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3changeset_invert.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/sqlite3changeset_invert.3
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/sqlite3changeset_invert.3')
-rw-r--r--static/netbsd/man3/sqlite3changeset_invert.355
1 files changed, 55 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3changeset_invert.3 b/static/netbsd/man3/sqlite3changeset_invert.3
new file mode 100644
index 00000000..98ff8327
--- /dev/null
+++ b/static/netbsd/man3/sqlite3changeset_invert.3
@@ -0,0 +1,55 @@
+.Dd January 24, 2024
+.Dt SQLITE3CHANGESET_INVERT 3
+.Os
+.Sh NAME
+.Nm sqlite3changeset_invert
+.Nd invert a changeset
+.Sh SYNOPSIS
+.In sqlite3.h
+.Ft int
+.Fo sqlite3changeset_invert
+.Fa "int nIn"
+.Fa "const void *pIn"
+.Fa "int *pnOut"
+.Fa "void **ppOut"
+.Fc
+.Sh DESCRIPTION
+This function is used to "invert" a changeset object.
+Applying an inverted changeset to a database reverses the effects of
+applying the uninverted changeset.
+Specifically:
+.Bl -bullet
+.It
+Each DELETE change is changed to an INSERT, and
+.It
+Each INSERT change is changed to a DELETE, and
+.It
+For each UPDATE change, the old.* and new.* values are exchanged.
+.El
+.Pp
+This function does not change the order in which changes appear within
+the changeset.
+It merely reverses the sense of each individual change.
+.Pp
+If successful, a pointer to a buffer containing the inverted changeset
+is stored in *ppOut, the size of the same buffer is stored in *pnOut,
+and SQLITE_OK is returned.
+If an error occurs, both *pnOut and *ppOut are zeroed and an SQLite
+error code returned.
+.Pp
+It is the responsibility of the caller to eventually call sqlite3_free()
+on the *ppOut pointer to free the buffer allocation following a successful
+call to this function.
+.Pp
+WARNING/TODO: This function currently assumes that the input is a valid
+changeset.
+If it is not, the results are undefined.
+.Sh IMPLEMENTATION NOTES
+These declarations were extracted from the
+interface documentation at line 11741.
+.Bd -literal
+SQLITE_API int sqlite3changeset_invert(
+ int nIn, const void *pIn, /* Input changeset */
+ int *pnOut, void **ppOut /* OUT: Inverse of input */
+);
+.Ed