From 63847496f14c813a5d80efd5b7de0f1294ffe1e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:07:11 +0200 Subject: Adding upstream version 3.45.1. Signed-off-by: Daniel Baumann --- www/c3ref/collation_needed.html | 162 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 www/c3ref/collation_needed.html (limited to 'www/c3ref/collation_needed.html') diff --git a/www/c3ref/collation_needed.html b/www/c3ref/collation_needed.html new file mode 100644 index 0000000..0edbda6 --- /dev/null +++ b/www/c3ref/collation_needed.html @@ -0,0 +1,162 @@ + + + + + +Collation Needed Callbacks + + + +
+ + + +
+
+Small. Fast. Reliable.
Choose any three. +
+ + +
+
+ + + +
+
+
+ + +
+

SQLite C Interface

+

Collation Needed Callbacks

+
+
+int sqlite3_collation_needed(
+  sqlite3*,
+  void*,
+  void(*)(void*,sqlite3*,int eTextRep,const char*)
+);
+int sqlite3_collation_needed16(
+  sqlite3*,
+  void*,
+  void(*)(void*,sqlite3*,int eTextRep,const void*)
+);
+
+

+To avoid having to register all collation sequences before a database +can be used, a single callback function may be registered with the +database connection to be invoked whenever an undefined collation +sequence is required.

+ +

If the function is registered using the sqlite3_collation_needed() API, +then it is passed the names of undefined collation sequences as strings +encoded in UTF-8. If sqlite3_collation_needed16() is used, +the names are passed as UTF-16 in machine native byte order. +A call to either function replaces the existing collation-needed callback.

+ +

When the callback is invoked, the first argument passed is a copy +of the second argument to sqlite3_collation_needed() or +sqlite3_collation_needed16(). The second argument is the database +connection. The third argument is one of SQLITE_UTF8, SQLITE_UTF16BE, +or SQLITE_UTF16LE, indicating the most desirable form of the collation +sequence function required. The fourth parameter is the name of the +required collation sequence.

+ +

The callback function should register the desired collation using +sqlite3_create_collation(), sqlite3_create_collation16(), or +sqlite3_create_collation_v2(). +

See also lists of + Objects, + Constants, and + Functions.

+ -- cgit v1.2.3