diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
| commit | 253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch) | |
| tree | adf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 | |
| parent | a9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff) | |
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3')
| -rw-r--r-- | static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 b/static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 new file mode 100644 index 00000000..54721019 --- /dev/null +++ b/static/netbsd/man3/SQLITE_VTAB_CONSTRAINT_SUPPORT.3 @@ -0,0 +1,90 @@ +.Dd January 24, 2024 +.Dt SQLITE_VTAB_CONSTRAINT_SUPPORT 3 +.Os +.Sh NAME +.Nm SQLITE_VTAB_CONSTRAINT_SUPPORT , +.Nm SQLITE_VTAB_INNOCUOUS , +.Nm SQLITE_VTAB_DIRECTONLY , +.Nm SQLITE_VTAB_USES_ALL_SCHEMAS +.Nd virtual table configuration options +.Sh SYNOPSIS +.In sqlite3.h +.Fd #define SQLITE_VTAB_CONSTRAINT_SUPPORT +.Fd #define SQLITE_VTAB_INNOCUOUS +.Fd #define SQLITE_VTAB_DIRECTONLY +.Fd #define SQLITE_VTAB_USES_ALL_SCHEMAS +.Sh DESCRIPTION +These macros define the various options to the +.Fn sqlite3_vtab_config +interface that virtual table implementations can use to +customize and optimize their behavior. +.Bl -tag -width Ds +.It SQLITE_VTAB_CONSTRAINT_SUPPORT +Calls of the form sqlite3_vtab_config(db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) +are supported, where X is an integer. +If X is zero, then the virtual table whose xCreate +or xConnect method invoked +.Fn sqlite3_vtab_config +does not support constraints. +In this configuration (which is the default) if a call to the xUpdate +method returns SQLITE_CONSTRAINT, then the entire +statement is rolled back as if OR ABORT had been specified +as part of the users SQL statement, regardless of the actual ON CONFLICT +mode specified. +.Pp +If X is non-zero, then the virtual table implementation guarantees +that if xUpdate returns SQLITE_CONSTRAINT, +it will do so before any modifications to internal or persistent data +structures have been made. +If the ON CONFLICT mode is ABORT, FAIL, IGNORE or ROLLBACK, +SQLite is able to roll back a statement or database transaction, and +abandon or continue processing the current SQL statement as appropriate. +If the ON CONFLICT mode is REPLACE and the xUpdate method returns +SQLITE_CONSTRAINT, SQLite handles this as if the ON +CONFLICT mode had been ABORT. +.Pp +Virtual table implementations that are required to handle OR REPLACE +must do so within the xUpdate method. +If a call to the +.Fn sqlite3_vtab_on_conflict +function indicates that the current ON CONFLICT policy is REPLACE, +the virtual table implementation should silently replace the appropriate +rows within the xUpdate callback and return SQLITE_OK. +Or, if this is not possible, it may return SQLITE_CONSTRAINT, in which +case SQLite falls back to OR ABORT constraint handling. +.It SQLITE_VTAB_DIRECTONLY +Calls of the form sqlite3_vtab_config(db,SQLITE_VTAB_DIRECTONLY) +from within the the xConnect or xCreate methods of a +virtual table implementation prohibits that virtual table +from being used from within triggers and views. +.It SQLITE_VTAB_INNOCUOUS +Calls of the form sqlite3_vtab_config(db,SQLITE_VTAB_INNOCUOUS) +from within the the xConnect or xCreate methods of a +virtual table implementation identify that virtual table +as being safe to use from within triggers and views. +Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the virtual +table can do no serious harm even if it is controlled by a malicious +hacker. +Developers should avoid setting the SQLITE_VTAB_INNOCUOUS flag unless +absolutely necessary. +.It SQLITE_VTAB_USES_ALL_SCHEMAS +Calls of the form sqlite3_vtab_config(db,SQLITE_VTAB_USES_ALL_SCHEMA) +from within the the xConnect or xCreate methods of a +virtual table implementation instruct the query planner +to begin at least a read transaction on all schemas ("main", "temp", +and any ATTACH-ed databases) whenever the virtual table is used. +.El +.Pp +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 9740. +.Bd -literal +#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 +#define SQLITE_VTAB_INNOCUOUS 2 +#define SQLITE_VTAB_DIRECTONLY 3 +#define SQLITE_VTAB_USES_ALL_SCHEMAS 4 +.Ed +.Sh SEE ALSO +.Xr sqlite3_vtab_config 3 , +.Xr sqlite3_vtab_on_conflict 3 , +.Xr SQLITE_OK 3 |
