Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
column_blob.html

Index Summary Markup Original


R-53946-02894-03994-04896-49185-13086-04703-60466 tcl slt th3 src

These routines return information about a single column of the current result row of a query.

th3/req1/column01.test:10   th3/req1/column02.test:10   th3/req1/column03.test:10

/* IMP: R-53946-02894 */
# EVIDENCE-OF: R-53946-02894 These routines return information about a
# single column of the current result row of a query.

R-12525-60165-32842-37850-04403-38425-48242-20323 tcl slt th3 src

In every case the first argument is a pointer to the prepared statement that is being evaluated (the sqlite3_stmt* that was returned from sqlite3_prepare_v2() or one of its variants) and the second argument is the index of the column for which information should be returned.

th3/req1/column01.test:13   th3/req1/column02.test:13   th3/req1/column03.test:13

/* IMP: R-12525-60165 */
# EVIDENCE-OF: R-12525-60165 In every case the first argument is a
# pointer to the prepared statement that is being evaluated (the
# sqlite3_stmt* that was returned from sqlite3_prepare_v2() or one of
# its variants) and the second argument is the index of the column for
# which information should be returned.

R-29987-53326-32227-44761-37373-28199-35279-34751 tcl slt th3 src

The leftmost column of the result set has the index 0.

th3/req1/column01.test:31

/* IMP: R-29987-53326 */
# EVIDENCE-OF: R-29987-53326 The leftmost column of the result set has
# the index 0.

R-55352-50321-25777-65350-51066-10256-38308-17470 tcl slt th3 src

The number of columns in the result can be determined using sqlite3_column_count().

th3/req1/column01.test:40

/* IMP: R-55352-50321 */
# EVIDENCE-OF: R-55352-50321 The number of columns in the result can be
# determined using sqlite3_column_count().

R-28995-46979-25570-20018-47836-46368-43472-22663 tcl slt th3 src

The sqlite3_column_type() routine returns the datatype code for the initial data type of the result column.

th3/req1/column01.test:46

/* IMP: R-28995-46979 */
# EVIDENCE-OF: R-28995-46979 The sqlite3_column_type() routine returns
# the datatype code for the initial data type of the result column.

R-15172-56782-14433-51557-38019-58913-08243-11771 tcl slt th3 src

The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL.

th3/req1/column01.test:49

/* IMP: R-15172-56782 */
# EVIDENCE-OF: R-15172-56782 The returned value is one of
# SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or
# SQLITE_NULL.

R-27363-63308-55807-24434-61973-58824-33773-60814 tcl slt th3 src

If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() routine returns the number of bytes in that BLOB or string.

th3/req1/column01.test:77

/* IMP: R-27363-63308 */
# EVIDENCE-OF: R-27363-63308 If the result is a BLOB or UTF-8 string
# then the sqlite3_column_bytes() routine returns the number of bytes in
# that BLOB or string.

R-07987-54086-28782-61595-63457-13975-41237-46869 tcl slt th3 src

If the result is a UTF-16 string, then sqlite3_column_bytes() converts the string to UTF-8 and then returns the number of bytes.

th3/req1/column01.test:117

/* IMP: R-07987-54086 */
# EVIDENCE-OF: R-07987-54086 If the result is a UTF-16 string, then
# sqlite3_column_bytes() converts the string to UTF-8 and then returns
# the number of bytes.

R-06526-21822-44146-52005-29553-25229-08273-20735 tcl slt th3 src

If the result is a numeric value then sqlite3_column_bytes() uses sqlite3_snprintf() to convert that value to a UTF-8 string and returns the number of bytes in that string.

th3/req1/column01.test:88

/* IMP: R-06526-21822 */
# EVIDENCE-OF: R-06526-21822 If the result is a numeric value then
# sqlite3_column_bytes() uses sqlite3_snprintf() to convert that value
# to a UTF-8 string and returns the number of bytes in that string.

R-07391-62365-50484-20583-23156-31411-22306-43291 tcl slt th3 src

If the result is NULL, then sqlite3_column_bytes() returns zero.

th3/req1/column01.test:95

/* IMP: R-07391-62365 */
# EVIDENCE-OF: R-07391-62365 If the result is NULL, then
# sqlite3_column_bytes() returns zero.

R-30008-03647-27202-20831-29850-54434-32362-14140 tcl slt th3 src

If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() routine returns the number of bytes in that BLOB or string.

th3/req1/column01.test:170

/* IMP: R-30008-03647 */
# EVIDENCE-OF: R-30008-03647 If the result is a BLOB or UTF-16 string
# then the sqlite3_column_bytes16() routine returns the number of bytes
# in that BLOB or string.

R-34998-49915-07664-55575-37059-29902-40579-47714 tcl slt th3 src

If the result is a UTF-8 string, then sqlite3_column_bytes16() converts the string to UTF-16 and then returns the number of bytes.

th3/req1/column01.test:194

/* IMP: R-34998-49915 */
# EVIDENCE-OF: R-34998-49915 If the result is a UTF-8 string, then
# sqlite3_column_bytes16() converts the string to UTF-16 and then
# returns the number of bytes.

R-42670-46183-00438-39556-01982-63614-08671-47686 tcl slt th3 src

If the result is a numeric value then sqlite3_column_bytes16() uses sqlite3_snprintf() to convert that value to a UTF-16 string and returns the number of bytes in that string.

th3/req1/column01.test:101

/* IMP: R-42670-46183 */
# EVIDENCE-OF: R-42670-46183 If the result is a numeric value then
# sqlite3_column_bytes16() uses sqlite3_snprintf() to convert that value
# to a UTF-16 string and returns the number of bytes in that string.

R-11920-30904-34388-20276-30838-60938-49360-56760 tcl slt th3 src

If the result is NULL, then sqlite3_column_bytes16() returns zero.

th3/req1/column01.test:110

/* IMP: R-11920-30904 */
# EVIDENCE-OF: R-11920-30904 If the result is NULL, then
# sqlite3_column_bytes16() returns zero.

R-12598-40983-37822-03408-00608-51890-59841-03948 tcl slt th3 src

The values returned by sqlite3_column_bytes() and sqlite3_column_bytes16() do not include the zero terminators at the end of the string.

th3/req1/column01.test:121   th3/req1/column01.test:174

/* IMP: R-12598-40983 */
# EVIDENCE-OF: R-12598-40983 The values returned by
# sqlite3_column_bytes() and sqlite3_column_bytes16() do not include the
# zero terminators at the end of the string.

R-13793-11620-18643-36656-33877-44501-53404-27731 tcl slt th3 src

For clarity: the values returned by sqlite3_column_bytes() and sqlite3_column_bytes16() are the number of bytes in the string, not the number of characters.

th3/req1/column01.test:206

/* IMP: R-13793-11620 */
# EVIDENCE-OF: R-13793-11620 For clarity: the values returned by
# sqlite3_column_bytes() and sqlite3_column_bytes16() are the number of
# bytes in the string, not the number of characters.

R-31275-44060-31786-28874-63587-64128-53792-58628 tcl slt th3 src

Strings returned by sqlite3_column_text() and sqlite3_column_text16(), even empty strings, are always zero-terminated.

src/vdbemem.c:1326   th3/req1/column01.test:256

/* IMP: R-31275-44060 */
# EVIDENCE-OF: R-31275-44060 Strings returned by sqlite3_column_text()
# and sqlite3_column_text16(), even empty strings, are always
# zero-terminated.

R-39464-12723-18801-15682-15503-09131-15880-06935 tcl slt th3 src

The return value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.

th3/req1/column01.test:292

/* IMP: R-39464-12723 */
# EVIDENCE-OF: R-39464-12723 The return value from sqlite3_column_blob()
# for a zero-length BLOB is a NULL pointer.

R-17551-26524-16048-03104-21027-35305-23436-00948 tcl slt th3 src

Strings returned by sqlite3_column_text16() always have the endianness which is native to the platform, regardless of the text encoding set for the database.

/* IMP: R-17551-26524 */
# EVIDENCE-OF: R-17551-26524 Strings returned by sqlite3_column_text16()
# always have the endianness which is native to the platform, regardless
# of the text encoding set for the database.

R-05452-35198-10871-20803-29102-44206-02290-23562 tcl slt th3 src

The object returned by sqlite3_column_value() is an unprotected sqlite3_value object.

th3/req1/column01.test:302

/* IMP: R-05452-35198 */
# EVIDENCE-OF: R-05452-35198 The object returned by
# sqlite3_column_value() is an unprotected sqlite3_value object.

R-42640-12758-34834-48042-16634-19699-19506-39894 tcl slt th3 src

For example, if the internal representation is FLOAT and a text result is requested, sqlite3_snprintf() is used internally to perform the conversion automatically.

th3/req1/column02.test:107

/* IMP: R-42640-12758 */
# EVIDENCE-OF: R-42640-12758 For example, if the internal representation
# is FLOAT and a text result is requested, sqlite3_snprintf() is used
# internally to perform the conversion automatically.

R-51683-37067-53622-45311-56999-04047-27955-39232 tcl slt th3 src

The following table details the conversions that are applied:

Internal
Type
Requested
Type
Conversion

NULL INTEGER Result is 0
NULL FLOAT Result is 0.0
NULL TEXT Result is a NULL pointer
NULL BLOB Result is a NULL pointer
INTEGER FLOAT Convert from integer to float
INTEGER TEXT ASCII rendering of the integer
INTEGER BLOB Same as INTEGER->TEXT
FLOAT INTEGER CAST to INTEGER
FLOAT TEXT ASCII rendering of the float
FLOAT BLOB CAST to BLOB
TEXT INTEGER CAST to INTEGER
TEXT FLOAT CAST to REAL
TEXT BLOB No change
BLOB INTEGER CAST to INTEGER
BLOB FLOAT CAST to REAL
BLOB TEXT CAST to TEXT, ensure zero terminator

th3/req1/column02.test:35

/* IMP: R-51683-37067 */
# EVIDENCE-OF: R-51683-37067 The following table details the conversions
# that are applied: InternalType RequestedType Conversion NULL INTEGER
# Result is 0 NULL FLOAT Result is 0.0 NULL TEXT Result is a NULL
# pointer NULL BLOB Result is a NULL pointer INTEGER FLOAT Convert from
# integer to float INTEGER TEXT ASCII rendering of the integer INTEGER
# BLOB Same as INTEGER->TEXT FLOAT INTEGER CAST to INTEGER FLOAT TEXT
# ASCII rendering of the float FLOAT BLOB CAST to BLOB TEXT INTEGER CAST
# to INTEGER TEXT FLOAT CAST to REAL TEXT BLOB No change BLOB INTEGER
# CAST to INTEGER BLOB FLOAT CAST to REAL BLOB TEXT CAST to TEXT, ensure
# zero terminator

R-59391-62387-22553-12077-41502-35655-02982-42889 tcl slt th3 src

Conversions between UTF-16be and UTF-16le are always done in place and do not invalidate a prior pointer, though of course the content of the buffer that the prior pointer references will have been modified.

th3/req1/column03.test:33

/* IMP: R-59391-62387 */
# EVIDENCE-OF: R-59391-62387 Conversions between UTF-16be and UTF-16le
# are always done in place and do not invalidate a prior pointer, though
# of course the content of the buffer that the prior pointer references
# will have been modified.

R-35092-12727-62894-63814-26795-55319-59085-22626 tcl slt th3 src

The pointers returned are valid until a type conversion occurs as described above, or until sqlite3_step() or sqlite3_reset() or sqlite3_finalize() is called.

th3/req1/column03.test:63

/* IMP: R-35092-12727 */
# EVIDENCE-OF: R-35092-12727 The pointers returned are valid until a
# type conversion occurs as described above, or until sqlite3_step() or
# sqlite3_reset() or sqlite3_finalize() is called.

R-03108-55458-13871-22315-35483-39116-29628-08970 tcl slt th3 src

The memory space used to hold strings and BLOBs is freed automatically.

th3/req1/column01.test:19   th3/req1/column02.test:19   th3/req1/column03.test:19

/* IMP: R-03108-55458 */
# EVIDENCE-OF: R-03108-55458 The memory space used to hold strings and
# BLOBs is freed automatically.