*** DRAFT ***

SQLite Requirement Matrix Details
create_collation.html

Index Summary Markup Original


R-40390-09039-54106-21086-56168-24022-18205-41129 tcl slt th3 src

These functions add, remove, or modify a collation associated with the database connection specified as the first argument.

th3/req1/createcoll01.test:10

/* IMP: R-40390-09039 */
# EVIDENCE-OF: R-40390-09039 These functions add, remove, or modify a
# collation associated with the database connection specified as the
# first argument.

R-59626-52827-57662-05724-48441-25095-54534-18435 tcl slt th3 src

The name of the collation is a UTF-8 string for sqlite3_create_collation() and sqlite3_create_collation_v2() and a UTF-16 string in native byte order for sqlite3_create_collation16().

th3/req1/createcoll01.test:162

/* IMP: R-59626-52827 */
# EVIDENCE-OF: R-59626-52827 The name of the collation is a UTF-8 string
# for sqlite3_create_collation() and sqlite3_create_collation_v2() and a
# UTF-16 string in native byte order for sqlite3_create_collation16().

R-04232-24861-40917-13992-27645-07811-63353-60101 tcl slt th3 src

Collation names that compare equal according to sqlite3_strnicmp() are considered to be the same name.

th3/req1/createcoll01.test:231

/* IMP: R-04232-24861 */
# EVIDENCE-OF: R-04232-24861 Collation names that compare equal
# according to sqlite3_strnicmp() are considered to be the same name.

R-21508-14355-30725-13403-38836-44113-60272-57161 tcl slt th3 src

The third argument (eTextRep) must be one of the constants:

th3/req1/createcoll01.test:312

/* IMP: R-21508-14355 */
# EVIDENCE-OF: R-21508-14355 The third argument (eTextRep) must be one
# of the constants: SQLITE_UTF8, SQLITE_UTF16LE, SQLITE_UTF16BE,
# SQLITE_UTF16, or SQLITE_UTF16_ALIGNED.

R-08137-02757-06056-54602-11771-11326-16926-36130 tcl slt th3 src

The eTextRep argument determines the encoding of strings passed to the collating function callback, xCompare.

th3/req1/createcoll01.test:234

/* IMP: R-08137-02757 */
# EVIDENCE-OF: R-08137-02757 The eTextRep argument determines the
# encoding of strings passed to the collating function callback,
# xCompare.

R-33414-20006-38430-38330-20007-08440-33108-23538 tcl slt th3 src

The SQLITE_UTF16 and SQLITE_UTF16_ALIGNED values for eTextRep force strings to be UTF16 with native byte order.

th3/req1/createcoll01.test:286

/* IMP: R-33414-20006 */
# EVIDENCE-OF: R-33414-20006 The SQLITE_UTF16 and SQLITE_UTF16_ALIGNED
# values for eTextRep force strings to be UTF16 with native byte order.

R-62291-37402-63159-44375-18587-14784-42471-08644 tcl slt th3 src

The SQLITE_UTF16_ALIGNED value for eTextRep forces strings to begin on an even byte address.

th3/req1/createcoll01.test:306

/* IMP: R-62291-37402 */
# EVIDENCE-OF: R-62291-37402 The SQLITE_UTF16_ALIGNED value for eTextRep
# forces strings to begin on an even byte address.

R-32806-65233-63423-39928-44686-28712-07931-12350 tcl slt th3 src

The fourth argument, pArg, is an application data pointer that is passed through as the first argument to the collating function callback.

th3/req1/createcoll01.test:14

/* IMP: R-32806-65233 */
# EVIDENCE-OF: R-32806-65233 The fourth argument, pArg, is an
# application data pointer that is passed through as the first argument
# to the collating function callback.

R-06154-44456-05106-65403-18746-31073-17094-53078 tcl slt th3 src

The fifth argument, xCompare, is a pointer to the collating function.

th3/req1/createcoll01.test:18

/* IMP: R-06154-44456 */
# EVIDENCE-OF: R-06154-44456 The fifth argument, xCompare, is a pointer
# to the collating function.

R-17004-26469-33978-15550-51185-63234-25288-10208 tcl slt th3 src

Multiple collating functions can be registered using the same name but with different eTextRep parameters and SQLite will use whichever function requires the least amount of data transformation.

th3/req1/createcoll01.test:226

/* IMP: R-17004-26469 */
# EVIDENCE-OF: R-17004-26469 Multiple collating functions can be
# registered using the same name but with different eTextRep parameters
# and SQLite will use whichever function requires the least amount of
# data transformation.

R-00811-45908-10631-64940-22455-40948-51133-47487 tcl slt th3 src

If the xCompare argument is NULL then the collating function is deleted.

th3/req1/createcoll01.test:204

/* IMP: R-00811-45908 */
# EVIDENCE-OF: R-00811-45908 If the xCompare argument is NULL then the
# collating function is deleted.

R-63294-00538-51136-33751-00245-32067-21028-12625 tcl slt th3 src

When all collating functions having the same name are deleted, that collation is no longer usable.

th3/req1/createcoll01.test:330

/* IMP: R-63294-00538 */
# EVIDENCE-OF: R-63294-00538 When all collating functions having the
# same name are deleted, that collation is no longer usable.

R-42196-45693-64496-49282-35220-26786-47093-56372 tcl slt th3 src

The collating function callback is invoked with a copy of the pArg application data pointer and with two strings in the encoding specified by the eTextRep argument.

th3/req1/createcoll01.test:44

/* IMP: R-42196-45693 */
# EVIDENCE-OF: R-42196-45693 The collating function callback is invoked
# with a copy of the pArg application data pointer and with two strings
# in the encoding specified by the eTextRep argument.

R-05416-57569-14245-59554-42970-16556-04782-39407 tcl slt th3 src

The sqlite3_create_collation_v2() works like sqlite3_create_collation() with the addition that the xDestroy callback is invoked on pArg when the collating function is deleted.

th3/req1/createcoll01.test:196

/* IMP: R-05416-57569 */
# EVIDENCE-OF: R-05416-57569 The sqlite3_create_collation_v2() works
# like sqlite3_create_collation() with the addition that the xDestroy
# callback is invoked on pArg when the collating function is deleted.

R-59553-21705-43899-06784-22214-40480-29104-54159 tcl slt th3 src

Collating functions are deleted when they are overridden by later calls to the collation creation functions or when the database connection is closed using sqlite3_close().

th3/req1/createcoll01.test:200

/* IMP: R-59553-21705 */
# EVIDENCE-OF: R-59553-21705 Collating functions are deleted when they
# are overridden by later calls to the collation creation functions or
# when the database connection is closed using sqlite3_close().

R-16618-15294-40098-25515-23421-58217-44729-28455 tcl slt th3 src

The xDestroy callback is not called if the sqlite3_create_collation_v2() function fails.

th3/req1/createcoll01.test:320

/* IMP: R-16618-15294 */
# EVIDENCE-OF: R-16618-15294 The xDestroy callback is not called if the
# sqlite3_create_collation_v2() function fails.