diff options
Diffstat (limited to 'static/netbsd/man3/sqlite3_vtab_collation.3')
| -rw-r--r-- | static/netbsd/man3/sqlite3_vtab_collation.3 | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_vtab_collation.3 b/static/netbsd/man3/sqlite3_vtab_collation.3 new file mode 100644 index 00000000..aa505b95 --- /dev/null +++ b/static/netbsd/man3/sqlite3_vtab_collation.3 @@ -0,0 +1,59 @@ +.Dd January 24, 2024 +.Dt SQLITE3_VTAB_COLLATION 3 +.Os +.Sh NAME +.Nm sqlite3_vtab_collation +.Nd determine the collation for a virtual table constraint +.Sh SYNOPSIS +.In sqlite3.h +.Ft const char * +.Fo sqlite3_vtab_collation +.Fa "sqlite3_index_info*" +.Fa "int" +.Fc +.Sh DESCRIPTION +This function may only be called from within a call to the xBestIndex +method of a virtual table. +This function returns a pointer to a string that is the name of the +appropriate collation sequence to use for text comparisons on the constraint +identified by its arguments. +.Pp +The first argument must be the pointer to the sqlite3_index_info +object that is the first parameter to the xBestIndex() method. +The second argument must be an index into the aConstraint[] array belonging +to the sqlite3_index_info structure passed to xBestIndex. +.Pp +Important: The first parameter must be the same pointer that is passed +into the xBestMethod() method. +The first parameter may not be a pointer to a different sqlite3_index_info +object, even an exact copy. +.Pp +The return value is computed as follows: +.Bl -enum +.It +.Pp +If the constraint comes from a WHERE clause expression that contains +a COLLATE operator, then the name of the collation +specified by that COLLATE operator is returned. +.It +.Pp +If there is no COLLATE operator, but the column that is the subject +of the constraint specifies an alternative collating sequence via a +COLLATE clause on the column definition within the CREATE +TABLE statement that was passed into +.Fn sqlite3_declare_vtab , +then the name of that alternative collating sequence is returned. +.It +.Pp +Otherwise, "BINARY" is returned. +.El +.Pp +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 9854. +.Bd -literal +SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int); +.Ed +.Sh SEE ALSO +.Xr sqlite3_declare_vtab 3 , +.Xr sqlite3_index_info 3 |
