Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
lang_corefunc.html

Index Summary Markup Original


R-23979-26855-11433-13886-36819-17221-39687-26769 tcl slt th3 src

The abs(X) function returns the absolute value of the numeric argument X.

src/func.c:155   th3/cov1/func01.test:13

/* IMP: R-23979-26855 */
# EVIDENCE-OF: R-23979-26855 The abs(X) function returns the absolute
# value of the numeric argument X.

R-37434-19929-01541-26191-03532-28681-18224-01267 tcl slt th3 src

Abs(X) returns NULL if X is NULL.

src/func.c:178   th3/cov1/func01.test:99

/* IMP: R-37434-19929 */
# EVIDENCE-OF: R-37434-19929 Abs(X) returns NULL if X is NULL.

R-01992-00519-59560-42589-34051-44285-27634-29157 tcl slt th3 src

Abs(X) returns 0.0 if X is a string or blob that cannot be converted to a numeric value.

src/func.c:185   th3/cov1/func01.test:73

/* IMP: R-01992-00519 */
# EVIDENCE-OF: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob
# that cannot be converted to a numeric value.

R-31676-45509-42539-51511-07128-62436-51993-36875 tcl slt th3 src

If X is the integer -9223372036854775808 then abs(X) throws an integer overflow error since there is no equivalent positive 64-bit two complement value.

src/func.c:166   th3/cov1/func01.test:37

/* IMP: R-31676-45509 */
# EVIDENCE-OF: R-31676-45509 If X is the integer -9223372036854775808
# then abs(X) throws an integer overflow error since there is no
# equivalent positive 64-bit two complement value.

R-58361-29089-54084-23122-22641-61380-38258-02749 tcl slt th3 src

The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement, exclusive of statements in lower-level triggers.

tcl/e_changes.test:28   th3/req1/func01.test:10

/* IMP: R-58361-29089 */
# EVIDENCE-OF: R-58361-29089 The changes() function returns the number
# of database rows that were changed or inserted or deleted by the most
# recently completed INSERT, DELETE, or UPDATE statement, exclusive of
# statements in lower-level triggers.

R-32760-32347-32244-52807-46376-42633-04481-03393 tcl slt th3 src

The changes() SQL function is a wrapper around the sqlite3_changes64() C/C++ function and hence follows the same rules for counting changes.

src/func.c:586

/* IMP: R-32760-32347 */
# EVIDENCE-OF: R-32760-32347 The changes() SQL function is a wrapper
# around the sqlite3_changes64() C/C++ function and hence follows the
# same rules for counting changes.

R-55469-62130-44621-63602-01605-63421-57069-12544 tcl slt th3 src

The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively.

tcl/func.test:1379

/* IMP: R-55469-62130 */
# EVIDENCE-OF: R-55469-62130 The char(X1,X2,...,XN) function returns a
# string composed of characters having the unicode code point values of
# integers X1 through XN, respectively.

R-22655-13879-23181-45430-34065-63005-59196-64005 tcl slt th3 src

The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL.

th3/cov1/func01.test:124

/* IMP: R-22655-13879 */
# EVIDENCE-OF: R-22655-13879 The coalesce() function returns a copy of
# its first non-NULL argument, or NULL if all arguments are NULL.

R-48353-58021-05653-25479-47424-12546-41849-50684 tcl slt th3 src

Coalesce() must have at least 2 arguments.

th3/cov1/func01.test:193

/* IMP: R-48353-58021 */
# EVIDENCE-OF: R-48353-58021 Coalesce() must have at least 2 arguments.

R-32560-14372-33470-16044-22975-07371-58367-11915 tcl slt th3 src

The format(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library.

tcl/printf2.test:15   th3/cov1/printf08.test:9

/* IMP: R-32560-14372 */
# EVIDENCE-OF: R-32560-14372 The format(FORMAT,...) SQL function works
# like the sqlite3_mprintf() C-language function and the printf()
# function from the standard C library.

R-40086-60101-35729-43768-42445-10732-59805-35730 tcl slt th3 src

If the FORMAT argument is missing or NULL then the result is NULL.

tcl/printf2.test:26   th3/cov1/printf08.test:24

/* IMP: R-40086-60101 */
# EVIDENCE-OF: R-40086-60101 If the FORMAT argument is missing or NULL
# then the result is NULL.

R-02347-27622-26500-11854-22896-16033-00883-33051 tcl slt th3 src

The %n format is silently ignored and does not consume an argument.

tcl/printf2.test:77   th3/cov1/printf08.test:63

/* IMP: R-02347-27622 */
# EVIDENCE-OF: R-02347-27622 The %n format is silently ignored and does
# not consume an argument.

R-56064-04001-25559-63693-43897-15444-07346-25115 tcl slt th3 src

The %p format is an alias for %X.

tcl/printf2.test:89   th3/cov1/printf08.test:70

/* IMP: R-56064-04001 */
# EVIDENCE-OF: R-56064-04001 The %p format is an alias for %X.

R-17002-27534-60658-04301-02636-10331-43886-13324 tcl slt th3 src

The %z format is interchangeable with %s.

tcl/printf2.test:68   th3/cov1/printf08.test:87

/* IMP: R-17002-27534 */
# EVIDENCE-OF: R-17002-27534 The %z format is interchangeable with %s.

R-29410-53018-13680-36864-38018-28179-51962-01812 tcl slt th3 src

If there are too few arguments in the argument list, missing arguments are assumed to have a NULL value, which is translated into 0 or 0.0 for numeric formats or an empty string for %s.

tcl/printf2.test:95   th3/cov1/printf08.test:48

/* IMP: R-29410-53018 */
# EVIDENCE-OF: R-29410-53018 If there are too few arguments in the
# argument list, missing arguments are assumed to have a NULL value,
# which is translated into 0 or 0.0 for numeric formats or an empty
# string for %s.

R-61376-43478-41054-59749-08806-37073-25549-48326 tcl slt th3 src

The glob(X,Y) function is equivalent to the expression "Y GLOB X".

th3/req1/func01.test:69

/* IMP: R-61376-43478 */
# EVIDENCE-OF: R-61376-43478 The glob(X,Y) function is equivalent to the
# expression "Y GLOB X".

R-45676-18204-05370-40567-50208-38360-04513-21756 tcl slt th3 src

If the sqlite3_create_function() interface is used to override the glob(X,Y) function with an alternative implementation then the GLOB operator will invoke the alternative implementation.

th3/req1/func02.test:84

/* IMP: R-45676-18204 */
# EVIDENCE-OF: R-45676-18204 If the sqlite3_create_function() interface
# is used to override the glob(X,Y) function with an alternative
# implementation then the GLOB operator will invoke the alternative
# implementation.

R-57089-20897-11493-55029-43412-10473-15914-29086 tcl slt th3 src

The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob.

th3/cov1/func01.test:455

/* IMP: R-57089-20897 */
# EVIDENCE-OF: R-57089-20897 The hex() function interprets its argument
# as a BLOB and returns a string which is the upper-case hexadecimal
# rendering of the content of that blob.

R-54671-04027-22136-36062-14023-39261-02732-05176 tcl slt th3 src

The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL.

th3/cov1/func01.test:407

/* IMP: R-54671-04027 */
# EVIDENCE-OF: R-54671-04027 The ifnull() function returns a copy of its
# first non-NULL argument, or NULL if both arguments are NULL.

R-35443-03595-46720-21224-13105-18323-15585-18563 tcl slt th3 src

Ifnull() must have exactly 2 arguments.

th3/cov1/func01.test:426

/* IMP: R-35443-03595 */
# EVIDENCE-OF: R-35443-03595 Ifnull() must have exactly 2 arguments.

R-47349-36088-56332-49361-27773-46509-28359-10620 tcl slt th3 src

The ifnull() function is equivalent to coalesce() with two arguments.

th3/cov1/func01.test:435

/* IMP: R-47349-36088 */
# EVIDENCE-OF: R-47349-36088 The ifnull() function is equivalent to
# coalesce() with two arguments.

R-03172-04369-12643-00191-50851-55287-16649-54683 tcl slt th3 src

The iif(X,Y,Z) function returns the value Y if X is true, and Z otherwise.

/* IMP: R-03172-04369 */
# EVIDENCE-OF: R-03172-04369 The iif(X,Y,Z) function returns the value Y
# if X is true, and Z otherwise.

R-56368-08028-57945-39505-32022-20213-21801-17605 tcl slt th3 src

The iif(X,Y,Z) function is logically equivalent to and generates the same bytecode as the CASE expression "CASE WHEN X THEN Y ELSE Z END".

/* IMP: R-56368-08028 */
# EVIDENCE-OF: R-56368-08028 The iif(X,Y,Z) function is logically
# equivalent to and generates the same bytecode as the CASE expression
# "CASE WHEN X THEN Y ELSE Z END".

R-27549-59611-14621-06209-14436-33110-11201-06265 tcl slt th3 src

The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X.

tcl/instr.test:14

/* IMP: R-27549-59611 */
# EVIDENCE-OF: R-27549-59611 The instr(X,Y) function finds the first
# occurrence of string Y within string X and returns the number of prior
# characters plus 1, or 0 if Y is nowhere found within X.

R-46421-32541-46392-23903-65246-33066-39018-41515 tcl slt th3 src

Or, if X and Y are both BLOBs, then instr(X,Y) returns one more than the number bytes prior to the first occurrence of Y, or 0 if Y does not occur anywhere within X.

tcl/instr.test:208

/* IMP: R-46421-32541 */
# EVIDENCE-OF: R-46421-32541 Or, if X and Y are both BLOBs, then
# instr(X,Y) returns one more than the number bytes prior to the first
# occurrence of Y, or 0 if Y does not occur anywhere within X.

R-17329-35644-14084-44573-27599-05498-14002-35742 tcl slt th3 src

If both arguments X and Y to instr(X,Y) are non-NULL and are not BLOBs then both are interpreted as strings.

tcl/instr.test:225

/* IMP: R-17329-35644 */
# EVIDENCE-OF: R-17329-35644 If both arguments X and Y to instr(X,Y) are
# non-NULL and are not BLOBs then both are interpreted as strings.

R-14708-27487-63029-62326-38556-29353-26608-43462 tcl slt th3 src

If either X or Y are NULL in instr(X,Y) then the result is NULL.

tcl/instr.test:238

/* IMP: R-14708-27487 */
# EVIDENCE-OF: R-14708-27487 If either X or Y are NULL in instr(X,Y)
# then the result is NULL.

R-14875-52970-09502-55318-65489-30403-63848-22858 tcl slt th3 src

The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function.

th3/req1/func01.test:90

/* IMP: R-14875-52970 */
# EVIDENCE-OF: R-14875-52970 The last_insert_rowid() function returns
# the ROWID of the last row insert from the database connection which
# invoked the function.

R-51513-12026-58956-15151-33280-52344-26081-14635 tcl slt th3 src

The last_insert_rowid() SQL function is a wrapper around the sqlite3_last_insert_rowid() C/C++ interface function.

src/func.c:577

/* IMP: R-51513-12026 */
# EVIDENCE-OF: R-51513-12026 The last_insert_rowid() SQL function is a
# wrapper around the sqlite3_last_insert_rowid() C/C++ interface
# function.

R-19393-22085-63206-61334-35392-55321-46849-03619 tcl slt th3 src

For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character.

th3/cov1/func01.test:568

/* IMP: R-19393-22085 */
# EVIDENCE-OF: R-19393-22085 For a string value X, the length(X)
# function returns the number of characters (not bytes) in X prior to
# the first NUL character.

R-29691-21352-53312-54436-56868-51235-26976-62729 tcl slt th3 src

For a blob value X, length(X) returns the number of bytes in the blob.

th3/cov1/func01.test:596

/* IMP: R-29691-21352 */
# EVIDENCE-OF: R-29691-21352 For a blob value X, length(X) returns the
# number of bytes in the blob.

R-06121-44139-52990-59264-15521-64976-48420-00452 tcl slt th3 src

If X is NULL then length(X) is NULL.

th3/cov1/func01.test:625

/* IMP: R-06121-44139 */
# EVIDENCE-OF: R-06121-44139 If X is NULL then length(X) is NULL.

R-35003-32738-64790-42236-58307-21158-57428-12443 tcl slt th3 src

If X is numeric then length(X) returns the length of a string representation of X.

th3/cov1/func01.test:576

/* IMP: R-35003-32738 */
# EVIDENCE-OF: R-35003-32738 If X is numeric then length(X) returns the
# length of a string representation of X.

R-47394-08393-08013-46591-44142-56491-27088-03038 tcl slt th3 src

The like() function is used to implement the "Y LIKE X [ESCAPE Z]" expression.

th3/req1/func02.test:171

/* IMP: R-47394-08393 */
# EVIDENCE-OF: R-47394-08393 The like() function is used to implement
# the "Y LIKE X [ESCAPE Z]" expression.

R-38973-52184-38987-24216-42448-05561-19819-59369 tcl slt th3 src

If the optional ESCAPE clause is present, then the like() function is invoked with three arguments.

th3/req1/func02.test:195

/* IMP: R-38973-52184 */
# EVIDENCE-OF: R-38973-52184 If the optional ESCAPE clause is present,
# then the like() function is invoked with three arguments.

R-24738-46982-10847-07410-11065-35020-61549-58241 tcl slt th3 src

Otherwise, it is invoked with two arguments only.

th3/req1/func02.test:198

/* IMP: R-24738-46982 */
# EVIDENCE-OF: R-24738-46982 Otherwise, it is invoked with two arguments
# only.

R-29639-49338-45805-35258-41039-23584-19093-35749 tcl slt th3 src

The sqlite3_create_function() interface can be used to override the like() function and thereby change the operation of the LIKE operator.

th3/req1/func02.test:174

/* IMP: R-29639-49338 */
# EVIDENCE-OF: R-29639-49338 The sqlite3_create_function() interface can
# be used to override the like() function and thereby change the
# operation of the LIKE operator.

R-41921-05214-15323-21890-34251-22434-34985-19293 tcl slt th3 src

The likelihood(X,Y) function returns argument X unchanged.

tcl/func3.test:73

/* IMP: R-41921-05214 */
# EVIDENCE-OF: R-41921-05214 The likelihood(X,Y) function returns
# argument X unchanged.

R-44133-61651-41897-46315-46351-30200-24176-28474 tcl slt th3 src

The value Y in likelihood(X,Y) must be a floating point constant between 0.0 and 1.0, inclusive.

tcl/func3.test:95

/* IMP: R-44133-61651 */
# EVIDENCE-OF: R-44133-61651 The value Y in likelihood(X,Y) must be a
# floating point constant between 0.0 and 1.0, inclusive.

R-28535-44631-32814-50468-55427-04715-11501-46204 tcl slt th3 src

The likelihood(X) function is a no-op that the code generator optimizes away so that it consumes no CPU cycles during run-time (that is, during calls to sqlite3_step()).

tcl/func3.test:117

/* IMP: R-28535-44631 */
# EVIDENCE-OF: R-28535-44631 The likelihood(X) function is a no-op that
# the code generator optimizes away so that it consumes no CPU cycles
# during run-time (that is, during calls to sqlite3_step()).

R-31509-40414-28527-23209-39294-56164-06955-51281 tcl slt th3 src

The purpose of the likelihood(X,Y) function is to provide a hint to the query planner that the argument X is a boolean that is true with a probability of approximately Y.

th3/cov1/where42.test:17

/* IMP: R-31509-40414 */
# EVIDENCE-OF: R-31509-40414 The purpose of the likelihood(X,Y) function
# is to provide a hint to the query planner that the argument X is a
# boolean that is true with a probability of approximately Y.

R-01283-11636-17384-60742-28077-41928-22950-29282 tcl slt th3 src

The unlikely(X) function is short-hand for likelihood(X,0.0625).

src/resolve.c:1055

/* IMP: R-01283-11636 */
# EVIDENCE-OF: R-01283-11636 The unlikely(X) function is short-hand for
# likelihood(X,0.0625).

R-36850-34127-02357-30625-11793-50017-46803-57751 tcl slt th3 src

The likely(X) function is short-hand for likelihood(X,0.9375).

src/resolve.c:1057

/* IMP: R-36850-34127 */
# EVIDENCE-OF: R-36850-34127 The likely(X) function is short-hand for
# likelihood(X,0.9375).

R-23735-03107-03121-47557-18096-07566-30916-33769 tcl slt th3 src

The likely(X) function returns the argument X unchanged.

tcl/func3.test:170

/* IMP: R-23735-03107 */
# EVIDENCE-OF: R-23735-03107 The likely(X) function returns the argument
# X unchanged.

R-43464-09689-21831-49515-17205-20394-62676-59001 tcl slt th3 src

The likely(X) function is a no-op that the code generator optimizes away so that it consumes no CPU cycles at run-time (that is, during calls to sqlite3_step()).

tcl/func3.test:192

/* IMP: R-43464-09689 */
# EVIDENCE-OF: R-43464-09689 The likely(X) function is a no-op that the
# code generator optimizes away so that it consumes no CPU cycles at
# run-time (that is, during calls to sqlite3_step()).

R-44492-58344-41928-11727-58799-16717-41714-60827 tcl slt th3 src

The purpose of the likely(X) function is to provide a hint to the query planner that the argument X is a boolean value that is usually true.

th3/cov1/where42.test:13

/* IMP: R-44492-58344 */
# EVIDENCE-OF: R-44492-58344 The purpose of the likely(X) function is to
# provide a hint to the query planner that the argument X is a boolean
# value that is usually true.

R-53436-40973-13105-02748-62500-49771-13394-01786 tcl slt th3 src

The likely(X) function is equivalent to likelihood(X,0.9375).

src/resolve.c:1059

/* IMP: R-53436-40973 */
# EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent to
# likelihood(X,0.9375).

R-63519-36751-50402-28921-52304-51801-25208-52249 tcl slt th3 src

The load_extension(X,Y) function loads SQLite extensions out of the shared library file named X using the entry point Y.

th3/cov1/func03.test:27

/* IMP: R-63519-36751 */
# EVIDENCE-OF: R-63519-36751 The load_extension(X,Y) function loads
# SQLite extensions out of the shared library file named X using the
# entry point Y.

R-01265-50598-22943-30233-54647-62239-07339-33462 tcl slt th3 src

The result of load_extension() is always a NULL.

th3/cov1/func03.test:42

/* IMP: R-01265-50598 */
# EVIDENCE-OF: R-01265-50598 The result of load_extension() is always a
# NULL.

R-09261-46339-25709-54309-20729-08593-14367-03558 tcl slt th3 src

If Y is omitted then the default entry point name is used.

th3/cov1/func03.test:63

/* IMP: R-09261-46339 */
# EVIDENCE-OF: R-09261-46339 If Y is omitted then the default entry
# point name is used.

R-26578-03501-48329-54809-40303-33325-20677-03881 tcl slt th3 src

The load_extension() function raises an exception if the extension fails to load or initialize correctly.

th3/cov1/func03.test:107   th3/cov1/func03.test:51

/* IMP: R-26578-03501 */
# EVIDENCE-OF: R-26578-03501 The load_extension() function raises an
# exception if the extension fails to load or initialize correctly.

R-30224-53949-52765-04057-07963-58169-00243-05425 tcl slt th3 src

The load_extension() function will fail if the extension attempts to modify or delete an SQL function or collating sequence.

th3/cov1/func03.test:94

/* IMP: R-30224-53949 */
# EVIDENCE-OF: R-30224-53949 The load_extension() function will fail if
# the extension attempts to modify or delete an SQL function or
# collating sequence.

R-16057-55834-34183-27727-54013-42481-60412-05224 tcl slt th3 src

The extension can add new functions or collating sequences, but cannot modify or delete existing functions or collating sequences because those functions and/or collating sequences might be used elsewhere in the currently running SQL statement.

th3/cov1/func03.test:83

/* IMP: R-16057-55834 */
# EVIDENCE-OF: R-16057-55834 The extension can add new functions or
# collating sequences, but cannot modify or delete existing functions or
# collating sequences because those functions and/or collating sequences
# might be used elsewhere in the currently running SQL statement.

R-31312-33516-05278-47140-12669-18608-41834-55008 tcl slt th3 src

The lower(X) function returns a copy of string X with all ASCII characters converted to lower case.

th3/cov1/func02.test:17

/* IMP: R-31312-33516 */
# EVIDENCE-OF: R-31312-33516 The lower(X) function returns a copy of
# string X with all ASCII characters converted to lower case.

R-31442-26915-27818-62289-58213-54460-29931-06977 tcl slt th3 src

The default built-in lower() function works for ASCII characters only.

th3/cov1/func02.test:47

/* IMP: R-31442-26915 */
# EVIDENCE-OF: R-31442-26915 The default built-in lower() function works
# for ASCII characters only.

R-64249-42392-53555-26523-38701-52551-63844-05212 tcl slt th3 src

The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X.

th3/cov1/func02.test:63

/* IMP: R-64249-42392 */
# EVIDENCE-OF: R-64249-42392 The ltrim(X,Y) function returns a string
# formed by removing any and all characters that appear in Y from the
# left side of X.

R-58421-05800-43557-56576-34931-38170-06768-38707 tcl slt th3 src

If the Y argument is omitted, ltrim(X) removes spaces from the left side of X.

th3/cov1/func02.test:67

/* IMP: R-58421-05800 */
# EVIDENCE-OF: R-58421-05800 If the Y argument is omitted, ltrim(X)
# removes spaces from the left side of X.

R-60099-10331-60202-18303-15072-02692-09131-64001 tcl slt th3 src

The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL.

th3/cov1/func02.test:127   th3/req1/func03.test:10

/* IMP: R-60099-10331 */
# EVIDENCE-OF: R-60099-10331 The multi-argument max() function returns
# the argument with the maximum value, or return NULL if any argument is
# NULL.

R-41246-06467-15697-52258-02048-61500-49466-56999 tcl slt th3 src

The multi-argument max() function searches its arguments from left to right for an argument that defines a collating function and uses that collating function for all string comparisons.

th3/req1/func03.test:30

/* IMP: R-41246-06467 */
# EVIDENCE-OF: R-41246-06467 The multi-argument max() function searches
# its arguments from left to right for an argument that defines a
# collating function and uses that collating function for all string
# comparisons.

R-63138-42446-16317-19373-58144-17163-01725-20742 tcl slt th3 src

If none of the arguments to max() define a collating function, then the BINARY collating function is used.

th3/req1/func03.test:48

/* IMP: R-63138-42446 */
# EVIDENCE-OF: R-63138-42446 If none of the arguments to max() define a
# collating function, then the BINARY collating function is used.

R-01544-29257-62595-06861-33076-18858-48075-56444 tcl slt th3 src

Note that max() is a simple function when it has 2 or more arguments but operates as an aggregate function if given only a single argument.

th3/req1/func05.test:20

/* IMP: R-01544-29257 */
# EVIDENCE-OF: R-01544-29257 Note that max() is a simple function when
# it has 2 or more arguments but operates as an aggregate function if
# given only a single argument.

R-02811-30532-06780-49040-22686-08574-20833-13918 tcl slt th3 src

The multi-argument min() function returns the argument with the minimum value.

th3/cov1/func02.test:182   th3/req1/func03.test:55

/* IMP: R-02811-30532 */
# EVIDENCE-OF: R-02811-30532 The multi-argument min() function returns
# the argument with the minimum value.

R-17066-08509-20793-46689-03241-48208-02822-18117 tcl slt th3 src

The multi-argument min() function searches its arguments from left to right for an argument that defines a collating function and uses that collating function for all string comparisons.

th3/req1/func03.test:70

/* IMP: R-17066-08509 */
# EVIDENCE-OF: R-17066-08509 The multi-argument min() function searches
# its arguments from left to right for an argument that defines a
# collating function and uses that collating function for all string
# comparisons.

R-47421-29468-64946-07771-42048-44217-36224-10277 tcl slt th3 src

If none of the arguments to min() define a collating function, then the BINARY collating function is used.

th3/req1/func03.test:88

/* IMP: R-47421-29468 */
# EVIDENCE-OF: R-47421-29468 If none of the arguments to min() define a
# collating function, then the BINARY collating function is used.

R-46612-63606-63989-00465-43025-33740-12303-63068 tcl slt th3 src

Note that min() is a simple function when it has 2 or more arguments but operates as an aggregate function if given only a single argument.

th3/req1/func05.test:24

/* IMP: R-46612-63606 */
# EVIDENCE-OF: R-46612-63606 Note that min() is a simple function when
# it has 2 or more arguments but operates as an aggregate function if
# given only a single argument.

R-29649-49812-55856-43048-16547-37449-39759-10169 tcl slt th3 src

The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same.

th3/cov1/func02.test:238   th3/req1/func03.test:95

/* IMP: R-29649-49812 */
# EVIDENCE-OF: R-29649-49812 The nullif(X,Y) function returns its first
# argument if the arguments are different and NULL if the arguments are
# the same.

R-64107-03133-60846-38260-58078-31674-53966-09002 tcl slt th3 src

The nullif(X,Y) function searches its arguments from left to right for an argument that defines a collating function and uses that collating function for all string comparisons.

th3/req1/func03.test:110

/* IMP: R-64107-03133 */
# EVIDENCE-OF: R-64107-03133 The nullif(X,Y) function searches its
# arguments from left to right for an argument that defines a collating
# function and uses that collating function for all string comparisons.

R-29935-55502-30462-41824-13753-02448-58197-37881 tcl slt th3 src

If neither argument to nullif() defines a collating function then the BINARY collating function is used.

th3/req1/func03.test:118

/* IMP: R-29935-55502 */
# EVIDENCE-OF: R-29935-55502 If neither argument to nullif() defines a
# collating function then the BINARY collating function is used.

R-64900-53159-64756-09404-17809-46163-54022-59398 tcl slt th3 src

The printf() SQL function is an alias for the format() SQL function.

tcl/printf2.test:19   th3/cov1/printf08.test:13

/* IMP: R-64900-53159 */
# EVIDENCE-OF: R-64900-53159 The printf() SQL function is an alias for
# the format() SQL function.

R-38536-04510-23157-49681-06132-47285-44686-09674 tcl slt th3 src

The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement.

th3/cov1/func02.test:285

/* IMP: R-38536-04510 */
# EVIDENCE-OF: R-38536-04510 The quote(X) function returns the text of
# an SQL literal which is the value of its argument suitable for
# inclusion into an SQL statement.

R-48019-29352-09930-00922-22494-19242-19926-63915 tcl slt th3 src

Strings are surrounded by single-quotes with escapes on interior quotes as needed.

th3/cov1/func02.test:289

/* IMP: R-48019-29352 */
# EVIDENCE-OF: R-48019-29352 Strings are surrounded by single-quotes
# with escapes on interior quotes as needed.

R-60735-46752-55529-42699-37701-47683-08130-22396 tcl slt th3 src

BLOBs are encoded as hexadecimal literals.

th3/cov1/func02.test:292

/* IMP: R-60735-46752 */
# EVIDENCE-OF: R-60735-46752 BLOBs are encoded as hexadecimal literals.

R-36754-20545-04159-27572-44208-64137-08044-49180 tcl slt th3 src

Strings with embedded NUL characters cannot be represented as string literals in SQL and hence the returned string literal is truncated prior to the first NUL.

th3/cov1/func02.test:318

/* IMP: R-36754-20545 */
# EVIDENCE-OF: R-36754-20545 Strings with embedded NUL characters cannot
# be represented as string literals in SQL and hence the returned string
# literal is truncated prior to the first NUL.

R-13846-35797-43647-43739-38644-55287-36020-16236 tcl slt th3 src

The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807.

th3/req1/func03.test:125

/* IMP: R-13846-35797 */
# EVIDENCE-OF: R-13846-35797 The random() function returns a
# pseudo-random integer between -9223372036854775808 and
# +9223372036854775807.

R-45939-02717-13913-16916-47597-06370-47114-21935 tcl slt th3 src

The randomblob(N) function return an N-byte blob containing pseudo-random bytes.

th3/req1/func03.test:139

/* IMP: R-45939-02717 */
# EVIDENCE-OF: R-45939-02717 The randomblob(N) function return an N-byte
# blob containing pseudo-random bytes.

R-11061-58747-31587-59612-39335-16677-23352-15397 tcl slt th3 src

If N is less than 1 then a 1-byte random blob is returned.

th3/req1/func03.test:149

/* IMP: R-11061-58747 */
# EVIDENCE-OF: R-11061-58747 If N is less than 1 then a 1-byte random
# blob is returned.

R-21182-58169-20146-54960-02459-65291-16580-58190 tcl slt th3 src

The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X.

th3/req1/func03.test:160

/* IMP: R-21182-58169 */
# EVIDENCE-OF: R-21182-58169 The replace(X,Y,Z) function returns a
# string formed by substituting string Z for every occurrence of string
# Y in string X.

R-24454-61742-57320-38040-08939-30630-11445-30109 tcl slt th3 src

The BINARY collating sequence is used for comparisons.

th3/req1/func03.test:180

/* IMP: R-24454-61742 */
# EVIDENCE-OF: R-24454-61742 The BINARY collating sequence is used for
# comparisons.

R-50678-57776-62798-21946-06580-60998-12542-16606 tcl slt th3 src

If Y is an empty string then return X unchanged.

th3/req1/func03.test:187

/* IMP: R-50678-57776 */
# EVIDENCE-OF: R-50678-57776 If Y is an empty string then return X
# unchanged.

R-42393-33810-20509-47326-15941-02937-41283-04621 tcl slt th3 src

If Z is not initially a string, it is cast to a UTF-8 string prior to processing.

th3/req1/func03.test:194

/* IMP: R-42393-33810 */
# EVIDENCE-OF: R-42393-33810 If Z is not initially a string, it is cast
# to a UTF-8 string prior to processing.

R-10715-11594-42361-64533-62693-34754-22491-52002 tcl slt th3 src

The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point.

th3/cov1/func02.test:533

/* IMP: R-10715-11594 */
# EVIDENCE-OF: R-10715-11594 The round(X,Y) function returns a
# floating-point value X rounded to Y digits to the right of the decimal
# point.

R-03483-52769-52410-05619-35746-00615-60824-05182 tcl slt th3 src

If the Y argument is omitted or negative, it is taken to be 0.

th3/cov1/func02.test:537

/* IMP: R-03483-52769 */
# EVIDENCE-OF: R-03483-52769 If the Y argument is omitted or negative,
# it is taken to be 0.

R-23317-43079-57684-22333-28404-22394-54055-23674 tcl slt th3 src

The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X.

th3/req1/func03.test:206

/* IMP: R-23317-43079 */
# EVIDENCE-OF: R-23317-43079 The rtrim(X,Y) function returns a string
# formed by removing any and all characters that appear in Y from the
# right side of X.

R-58312-28618-40592-62073-31662-38591-25433-11093 tcl slt th3 src

If the Y argument is omitted, rtrim(X) removes spaces from the right side of X.

th3/req1/func03.test:220

/* IMP: R-58312-28618 */
# EVIDENCE-OF: R-58312-28618 If the Y argument is omitted, rtrim(X)
# removes spaces from the right side of X.

R-03595-19994-17649-33748-29680-14364-48502-36562 tcl slt th3 src

The sign(X) function returns -1, 0, or +1 if the argument X is a numeric value that is negative, zero, or positive, respectively.

/* IMP: R-03595-19994 */
# EVIDENCE-OF: R-03595-19994 The sign(X) function returns -1, 0, or +1
# if the argument X is a numeric value that is negative, zero, or
# positive, respectively.

R-61228-42590-45974-40340-24856-10702-49486-00890 tcl slt th3 src

If the argument to sign(X) is NULL or is a string or blob that cannot be losslessly converted into a number, then sign(X) returns NULL.

/* IMP: R-61228-42590 */
# EVIDENCE-OF: R-61228-42590 If the argument to sign(X) is NULL or is a
# string or blob that cannot be losslessly converted into a number, then
# sign(X) returns NULL.

R-59782-00072-08374-56821-09554-43453-45852-13316 tcl slt th3 src

The soundex(X) function returns a string that is the soundex encoding of the string X.

src/func.c:1548   th3/cov1/func07.test:15

/* IMP: R-59782-00072 */
# EVIDENCE-OF: R-59782-00072 The soundex(X) function returns a string
# that is the soundex encoding of the string X.

R-64894-50321-17583-62706-45487-44187-46471-34655 tcl slt th3 src

The string "?000" is returned if the argument is NULL or contains no ASCII alphabetic characters.

src/func.c:1593   th3/cov1/func07.test:61

/* IMP: R-64894-50321 */
# EVIDENCE-OF: R-64894-50321 The string "?000" is returned if the
# argument is NULL or contains no ASCII alphabetic characters.

R-25361-16150-63678-45550-40472-51042-22441-52100 tcl slt th3 src

This function is omitted from SQLite by default. It is only available if the SQLITE_SOUNDEX compile-time option is used when SQLite is built.

src/func.c:1540   th3/cov1/func07.test:72

/* IMP: R-25361-16150 */
# EVIDENCE-OF: R-25361-16150 This function is omitted from SQLite by
# default. It is only available if the SQLITE_SOUNDEX compile-time
# option is used when SQLite is built.

R-04922-24076-20312-31472-33218-43152-59920-55175 tcl slt th3 src

The sqlite_compileoption_get() SQL function is a wrapper around the sqlite3_compileoption_get() C/C++ function.

src/func.c:1038   th3/cov1/ctime02.test:49

/* IMP: R-04922-24076 */
# EVIDENCE-OF: R-04922-24076 The sqlite_compileoption_get() SQL function
# is a wrapper around the sqlite3_compileoption_get() C/C++ function.

R-43217-29904-47266-41497-40047-57138-51637-14307 tcl slt th3 src

This routine returns the N-th compile-time option used to build SQLite or NULL if N is out of range.

th3/cov1/ctime02.test:43   th3/cov1/ctime02.test:90

/* IMP: R-43217-29904 */
# EVIDENCE-OF: R-43217-29904 This routine returns the N-th compile-time
# option used to build SQLite or NULL if N is out of range.

R-39564-36305-13838-22783-16141-24782-64457-11535 tcl slt th3 src

The sqlite_compileoption_used() SQL function is a wrapper around the sqlite3_compileoption_used() C/C++ function.

src/func.c:1014   th3/cov1/ctime02.test:74

/* IMP: R-39564-36305 */
# EVIDENCE-OF: R-39564-36305 The sqlite_compileoption_used() SQL
# function is a wrapper around the sqlite3_compileoption_used() C/C++
# function.

R-19404-45868-36670-49387-53766-10214-08555-10559 tcl slt th3 src

When the argument X to sqlite_compileoption_used(X) is a string which is the name of a compile-time option, this routine returns true (1) or false (0) depending on whether or not that option was used during the build.

th3/cov1/ctime02.test:66

/* IMP: R-19404-45868 */
# EVIDENCE-OF: R-19404-45868 When the argument X to
# sqlite_compileoption_used(X) is a string which is the name of a
# compile-time option, this routine returns true (1) or false (0)
# depending on whether or not that option was used during the build.

R-62529-02872-42080-52891-13443-54286-42392-42073 tcl slt th3 src

The sqlite_offset(X) function returns the byte offset in the database file for the beginning of the record from which value would be read.

/* IMP: R-62529-02872 */
# EVIDENCE-OF: R-62529-02872 The sqlite_offset(X) function returns the
# byte offset in the database file for the beginning of the record from
# which value would be read.

R-01298-38284-36243-26684-29926-32770-62313-39537 tcl slt th3 src

The sqlite_source_id() function returns a string that identifies the specific version of the source code that was used to build the SQLite library.

th3/req1/func04.test:21

/* IMP: R-01298-38284 */
# EVIDENCE-OF: R-01298-38284 The sqlite_source_id() function returns a
# string that identifies the specific version of the source code that
# was used to build the SQLite library.

R-22138-49689-43749-53930-34571-29718-47006-51402 tcl slt th3 src

The string returned by sqlite_source_id() is the date and time that the source code was checked in followed by the SHA3-256 hash for that check-in.

th3/req1/func03.test:255

/* IMP: R-22138-49689 */
# EVIDENCE-OF: R-22138-49689 The string returned by sqlite_source_id()
# is the date and time that the source code was checked in followed by
# the SHA3-256 hash for that check-in.

R-24470-31136-04101-59681-51092-46521-28491-41459 tcl slt th3 src

This function is an SQL wrapper around the sqlite3_sourceid() C interface.

src/func.c:980   th3/req1/func04.test:13

/* IMP: R-24470-31136 */
# EVIDENCE-OF: R-24470-31136 This function is an SQL wrapper around the
# sqlite3_sourceid() C interface.

R-37910-23168-39063-40634-50772-23998-34303-02455 tcl slt th3 src

The sqlite_version() function returns the version string for the SQLite library that is running.

th3/req1/func04.test:39

/* IMP: R-37910-23168 */
# EVIDENCE-OF: R-37910-23168 The sqlite_version() function returns the
# version string for the SQLite library that is running.

R-48699-48617-19592-25745-27147-09294-16176-26232 tcl slt th3 src

This function is an SQL wrapper around the sqlite3_libversion() C-interface.

src/func.c:964   th3/req1/func04.test:32

/* IMP: R-48699-48617 */
# EVIDENCE-OF: R-48699-48617 This function is an SQL wrapper around the
# sqlite3_libversion() C-interface.

R-64130-24369-52120-61237-04539-27042-01288-33957 tcl slt th3 src

The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long.

th3/cov1/func02.test:769

/* IMP: R-64130-24369 */
# EVIDENCE-OF: R-64130-24369 The substr(X,Y,Z) function returns a
# substring of input string X that begins with the Y-th character and
# which is Z characters long.

R-08267-32299-63841-11105-16971-59372-17886-11855 tcl slt th3 src

If Z is omitted then substr(X,Y) returns all characters through the end of the string X beginning with the Y-th.

th3/cov1/func02.test:864

/* IMP: R-08267-32299 */
# EVIDENCE-OF: R-08267-32299 If Z is omitted then substr(X,Y) returns
# all characters through the end of the string X beginning with the
# Y-th.

R-64707-05329-18384-25236-31190-36839-36915-56468 tcl slt th3 src

The left-most character of X is number 1.

th3/cov1/func02.test:773

/* IMP: R-64707-05329 */
# EVIDENCE-OF: R-64707-05329 The left-most character of X is number 1.

R-34009-51042-01012-14502-52205-32655-22973-26621 tcl slt th3 src

If Y is negative then the first character of the substring is found by counting from the right rather than the left.

th3/cov1/func02.test:815

/* IMP: R-34009-51042 */
# EVIDENCE-OF: R-34009-51042 If Y is negative then the first character
# of the substring is found by counting from the right rather than the
# left.

R-13337-13961-14137-09012-22007-31627-17736-61931 tcl slt th3 src

If Z is negative then the abs(Z) characters preceding the Y-th character are returned.

th3/cov1/func02.test:838

/* IMP: R-13337-13961 */
# EVIDENCE-OF: R-13337-13961 If Z is negative then the abs(Z) characters
# preceding the Y-th character are returned.

R-16262-20798-18081-17023-40907-44361-41056-32016 tcl slt th3 src

If X is a string then characters indices refer to actual UTF-8 characters.

th3/cov1/func02.test:982

/* IMP: R-16262-20798 */
# EVIDENCE-OF: R-16262-20798 If X is a string then characters indices
# refer to actual UTF-8 characters.

R-22795-48828-40923-07115-03137-30466-52786-33478 tcl slt th3 src

If X is a BLOB then the indices refer to bytes.

th3/cov1/func02.test:903

/* IMP: R-22795-48828 */
# EVIDENCE-OF: R-22795-48828 If X is a BLOB then the indices refer to
# bytes.

R-38914-26427-29082-17331-29986-21952-39833-10934 tcl slt th3 src

The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened.

tcl/e_totalchanges.test:35   th3/cov1/func05.test:14

/* IMP: R-38914-26427 */
# EVIDENCE-OF: R-38914-26427 The total_changes() function returns the
# number of row changes caused by INSERT, UPDATE or DELETE statements
# since the current database connection was opened.

R-11217-42568-57485-35777-56824-16055-43053-10984 tcl slt th3 src

This function is a wrapper around the sqlite3_total_changes64() C/C++ interface.

src/func.c:611

/* IMP: R-11217-42568 */
# EVIDENCE-OF: R-11217-42568 This function is a wrapper around the
# sqlite3_total_changes64() C/C++ interface.

R-50629-09283-02529-31024-03182-51396-04180-35688 tcl slt th3 src

The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X.

th3/req1/func03.test:230

/* IMP: R-50629-09283 */
# EVIDENCE-OF: R-50629-09283 The trim(X,Y) function returns a string
# formed by removing any and all characters that appear in Y from both
# ends of X.

R-42511-45809-64803-32183-55869-46108-05938-14656 tcl slt th3 src

If the Y argument is omitted, trim(X) removes spaces from both ends of X.

th3/req1/func03.test:244

/* IMP: R-42511-45809 */
# EVIDENCE-OF: R-42511-45809 If the Y argument is omitted, trim(X)
# removes spaces from both ends of X.

R-62084-05956-21371-24273-03009-23026-15537-48661 tcl slt th3 src

The typeof(X) function returns a string that indicates the datatype of the expression X: "null", "integer", "real", "text", or "blob".

th3/cov1/func04.test:14

/* IMP: R-62084-05956 */
# EVIDENCE-OF: R-62084-05956 The typeof(X) function returns a string
# that indicates the datatype of the expression X: "null", "integer",
# "real", "text", or "blob".

R-40637-59981-01912-00645-08216-04874-58946-55893 tcl slt th3 src

The unhex(X,Y) function returns a BLOB value which is the decoding of the hexadecimal string X.

/* IMP: R-40637-59981 */
# EVIDENCE-OF: R-40637-59981 The unhex(X,Y) function returns a BLOB
# value which is the decoding of the hexadecimal string X.

R-45050-32981-21714-20042-65286-45162-19516-23155 tcl slt th3 src

If X contains any characters that are not hexadecimal digits and which are not in Y, then unhex(X,Y) returns NULL.

/* IMP: R-45050-32981 */
# EVIDENCE-OF: R-45050-32981 If X contains any characters that are not
# hexadecimal digits and which are not in Y, then unhex(X,Y) returns
# NULL.

R-51717-34902-15948-42188-29563-62557-43307-24010 tcl slt th3 src

If Y is omitted, it is understood to be an empty string and hence X must be a pure hexadecimal string.

/* IMP: R-51717-34902 */
# EVIDENCE-OF: R-51717-34902 If Y is omitted, it is understood to be an
# empty string and hence X must be a pure hexadecimal string.

R-11344-60106-55135-40920-39741-43909-09623-36783 tcl slt th3 src

All hexadecimal digits in X must occur in pairs, with both digits of each pair beginning immediately adjacent to one another, or else unhex(X,Y) returns NULL.

/* IMP: R-11344-60106 */
# EVIDENCE-OF: R-11344-60106 All hexadecimal digits in X must occur in
# pairs, with both digits of each pair beginning immediately adjacent to
# one another, or else unhex(X,Y) returns NULL.

R-32258-04844-48223-62355-37601-36225-52689-15977 tcl slt th3 src

If either parameter X or Y is NULL, then unhex(X,Y) returns NULL.

/* IMP: R-32258-04844 */
# EVIDENCE-OF: R-32258-04844 If either parameter X or Y is NULL, then
# unhex(X,Y) returns NULL.

R-45221-09189-37683-65025-02491-50996-53977-59097 tcl slt th3 src

The X input may contain an arbitrary mix of upper and lower case hexadecimal digits.

/* IMP: R-45221-09189 */
# EVIDENCE-OF: R-45221-09189 The X input may contain an arbitrary mix of
# upper and lower case hexadecimal digits.

R-50173-64790-29872-00225-02063-48244-60421-01409 tcl slt th3 src

Hexadecimal digits in Y have no affect on the translation of X. Only characters in Y that are not hexadecimal digits are ignored in X.

/* IMP: R-50173-64790 */
# EVIDENCE-OF: R-50173-64790 Hexadecimal digits in Y have no affect on
# the translation of X. Only characters in Y that are not hexadecimal
# digits are ignored in X.

R-29701-50711-44772-52633-13865-01358-40998-48117 tcl slt th3 src

The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X.

tcl/func.test:1375

/* IMP: R-29701-50711 */
# EVIDENCE-OF: R-29701-50711 The unicode(X) function returns the numeric
# unicode code point corresponding to the first character of the string
# X.

R-11152-23456-02631-23120-19562-51052-54000-26119 tcl slt th3 src

The unlikely(X) function returns the argument X unchanged.

tcl/func3.test:126

/* IMP: R-11152-23456 */
# EVIDENCE-OF: R-11152-23456 The unlikely(X) function returns the
# argument X unchanged.

R-22887-63324-57928-49032-58189-23826-57467-19364 tcl slt th3 src

The unlikely(X) function is a no-op that the code generator optimizes away so that it consumes no CPU cycles at run-time (that is, during calls to sqlite3_step()).

tcl/func3.test:148

/* IMP: R-22887-63324 */
# EVIDENCE-OF: R-22887-63324 The unlikely(X) function is a no-op that
# the code generator optimizes away so that it consumes no CPU cycles at
# run-time (that is, during calls to sqlite3_step()).

R-43820-61705-52813-55767-43715-42880-00775-50924 tcl slt th3 src

The purpose of the unlikely(X) function is to provide a hint to the query planner that the argument X is a boolean value that is usually not true.

th3/cov1/where42.test:9

/* IMP: R-43820-61705 */
# EVIDENCE-OF: R-43820-61705 The purpose of the unlikely(X) function is
# to provide a hint to the query planner that the argument X is a
# boolean value that is usually not true.

R-61304-29449-15087-21131-58882-51770-33861-39357 tcl slt th3 src

The unlikely(X) function is equivalent to likelihood(X, 0.0625).

src/resolve.c:1053

/* IMP: R-61304-29449 */
# EVIDENCE-OF: R-61304-29449 The unlikely(X) function is equivalent to
# likelihood(X, 0.0625).

R-35553-21226-59052-33659-22709-48132-34010-52118 tcl slt th3 src

The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent.

th3/cov1/func04.test:54

/* IMP: R-35553-21226 */
# EVIDENCE-OF: R-35553-21226 The upper(X) function returns a copy of
# input string X in which all lower-case ASCII characters are converted
# to their upper-case equivalent.

R-31842-04164-45925-20128-62976-05013-64077-31889 tcl slt th3 src

The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00.

th3/cov1/func04.test:95

/* IMP: R-31842-04164 */
# EVIDENCE-OF: R-31842-04164 The zeroblob(N) function returns a BLOB
# consisting of N bytes of 0x00.

R-00293-64994-39339-33419-11494-64597-05681-15697 tcl slt th3 src

This SQL function is implemented using the sqlite3_result_zeroblob() routine from the C/C++ interface.

src/func.c:1330

/* IMP: R-00293-64994 */
# EVIDENCE-OF: R-00293-64994 This SQL function is implemented using the
# sqlite3_result_zeroblob() routine from the C/C++ interface.