theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Sq3StmtC_Column_C_API

Sq3StmtC - Result Values From A Query … More...

+ Collaboration diagram for Sq3StmtC_Column_C_API:

Functions

static SQ3_VAL Sq3StmtColumnValue (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_BINN Sq3StmtColumnBlobHide (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_I32 Sq3StmtColumnBytes (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_I32 Sq3StmtColumnCount (SQ3_STMT pStmt)
 Number Of Columns In A Result Set …
 
static MK_DBL Sq3StmtColumnDouble (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_I32 Sq3StmtColumnInt (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_I64 Sq3StmtColumnInt64 (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MK_STRN Sq3StmtColumnName (SQ3_STMT sq3stmt, MK_I32 N)
 Column Names In A Result Set …
 
static MK_STRN Sq3StmtColumnTextHide (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static enum Sq3TypeE Sq3StmtColumnType (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result Values From A Query …
 
static MkBinaryR Sq3StmtColumnBlob (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result a MkBinaryR Value From A Query.
 
static MkStringR Sq3StmtColumnText (SQ3_STMT sq3stmt, MK_I32 iCol)
 Result a MkStringR Value From A Query.
 

Sq3StmtC - Sq3StmtC_Column_C_API - function

SQ3_VAL Sq3StmtColumnValueP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnValue
 
MkBinaryR Sq3StmtColumnBlobP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnBlob
 
MK_BINN Sq3StmtColumnBlobHideP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnBlobHide
 
MK_I32 Sq3StmtColumnBytesP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnBytes
 
MK_I32 Sq3StmtColumnCountP (SQ3_STMT pStmt)
 Non-inline replacement for Sq3StmtColumnCount
 
MK_DBL Sq3StmtColumnDoubleP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnDouble
 
MK_I32 Sq3StmtColumnIntP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnInt
 
MK_I64 Sq3StmtColumnInt64P (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnInt64
 
MK_STRN Sq3StmtColumnNameP (SQ3_STMT sq3stmt, MK_I32 N)
 Non-inline replacement for Sq3StmtColumnName
 
MkStringR Sq3StmtColumnTextP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnText
 
MK_STRN Sq3StmtColumnTextHideP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnTextHide
 
enum Sq3TypeE Sq3StmtColumnTypeP (SQ3_STMT sq3stmt, MK_I32 iCol)
 Non-inline replacement for Sq3StmtColumnType
 

Detailed Description

Sq3StmtC - Result Values From A Query …

Function Documentation

◆ Sq3StmtColumnBlob()

static MkBinaryR Sq3StmtColumnBlob ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result a MkBinaryR Value From A Query.

This is an enhanced version of Sq3StmtColumnBlobHide using the Programming-Language-Micro-Kernel (PLMK) definition of a blob called MkBinaryR as return-value.

Parameters
[in]sq3stmtthe Sq3StmtC instance to work on a statement
[in]iColIs the index of the column for which information should be returned. The leftmost column of the result set has the index 0.
Returns
The MkBinaryR value requested

Sq3StmtColumnBlobHide : documentation

Result Values From A Query …
Summary:
sqlite3_column_blobBLOB result
sqlite3_column_doubleREAL result
sqlite3_column_int32-bit INTEGER result
sqlite3_column_int6464-bit INTEGER result
sqlite3_column_textUTF-8 TEXT result
sqlite3_column_text16UTF-16 TEXT result
sqlite3_column_valueThe result as an Sq3ValueC object.
   
sqlite3_column_bytesSize of a BLOB or a UTF-8 TEXT result in bytes
sqlite3_column_bytes16   →  Size of UTF-16 TEXT in bytes
sqlite3_column_typeDefault datatype of the result
Details:
These routines return information about a single column of the current result row of a query. In every case the first argument is a pointer to the prepared statement that is being evaluated (the Sq3StmtC* that was returned from Sq3StmtPrepareV2 () or one of its variants) and the second argument is the index of the column for which information should be returned. The leftmost column of the result set has the index 0. The number of columns in the result can be determined using Sq3StmtColumnCount ().
If the SQL statement does not currently point to a valid row, or if the column index is out of range, the result is undefined. These routines may only be called when the most recent call to Sq3StmtStep () has returned SQ3_RESULT_ROW and neither Sq3StmtReset () nor Sq3StmtFinalize () have been called subsequently. If any of these routines are called after Sq3StmtReset () or Sq3StmtFinalize () or after Sq3StmtStep () has returned something other than SQ3_RESULT_ROW, the results are undefined. If Sq3StmtStep () or Sq3StmtReset () or Sq3StmtFinalize () are called from a different thread while any of these routines are pending, then the results are undefined.
The first six interfaces (_blob, _double, _int, _int64, _text, and _text16) each return the value of a result column in a specific data format. If the result column is not initially in the requested format (for example, if the query returns an integer but the Sq3StmtColumnText() interface is used to extract the value) then an automatic type conversion is performed.
The Sq3StmtColumnType() routine returns the datatype code for the initial data type of the result column. The returned value is one of SQ3_TYPE_INTEGER, SQ3_TYPE_FLOAT, SQ3_TYPE_TEXT, SQ3_TYPE_BLOB, or SQ3_TYPE_NULL. The return value of Sq3StmtColumnType() can be used to decide which of the first six interface should be used to extract the column value. The value returned by Sq3StmtColumnType() is only meaningful if no automatic type conversions have occurred for the value in question. After a type conversion, the result of calling Sq3StmtColumnType() is undefined, though harmless. Future versions of SQLite may change the behavior of Sq3StmtColumnType() following a type conversion.
If the result is a BLOB or a TEXT string, then the Sq3StmtColumnBytes() or sqlite3_column_bytes16() interfaces can be used to determine the size of that BLOB or string.
If the result is a BLOB or UTF-8 string then the Sq3StmtColumnBytes() routine returns the number of bytes in that BLOB or string. If the result is a UTF-16 string, then Sq3StmtColumnBytes() converts the string to UTF-8 and then returns the number of bytes. If the result is a numeric value then Sq3StmtColumnBytes() uses sqlite3_snprintf () to convert that value to a UTF-8 string and returns the number of bytes in that string. If the result is NULL, then Sq3StmtColumnBytes() returns zero.
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. 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. 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. If the result is NULL, then sqlite3_column_bytes16() returns zero.
The values returned by Sq3StmtColumnBytes () and sqlite3_column_bytes16 () do not include the zero terminators at the end of the string. For clarity: the values returned by Sq3StmtColumnBytes () and sqlite3_column_bytes16 () are the number of bytes in the string, not the number of characters.
Strings returned by Sq3StmtColumnText() and sqlite3_column_text16(), even empty strings, are always zero-terminated. The return value from Sq3StmtColumnBlob() for a zero-length BLOB is a NULL pointer.
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.
Warning: The object returned by Sq3StmtColumnValue () is an unprotected Sq3ValueC object. In a multithreaded environment, an unprotected Sq3ValueC object may only be used safely with Sq3StmtBindValue () and sqlite3_result_value (). If the unprotected Sq3ValueC object returned by Sq3StmtColumnValue () is used in any other way, including calls to routines like Sq3ValueInt (), Sq3ValueText (), or Sq3ValueBytes (), the behavior is not threadsafe. Hence, the Sq3StmtColumnValue() interface is normally only useful within the implementation of application-defined SQL functions or virtual tables, not within top-level application code.
These routines may attempt to convert the datatype of the result. For example, if the internal representation is FLOAT and a text result is requested, sqlite3_snprintf () is used internally to perform the conversion automatically. 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
Note that when type conversions occur, pointers returned by prior calls to Sq3StmtColumnBlob(), Sq3StmtColumnText(), and/or sqlite3_column_text16() may be invalidated. Type conversions and pointer invalidations might occur in the following cases:
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. Other kinds of conversion are done in place when it is possible, but sometimes they are not possible and in those cases prior pointers are invalidated.
The safest policy is to invoke these routines in one of the following ways:
In other words, you should call Sq3StmtColumnText(), Sq3StmtColumnBlob(), or sqlite3_column_text16() first to force the result into the desired format, then invoke Sq3StmtColumnBytes() or sqlite3_column_bytes16() to find the size of the result. Do not mix calls to Sq3StmtColumnText() or Sq3StmtColumnBlob() with calls to sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() with calls to Sq3StmtColumnBytes().
The pointers returned are valid until a type conversion occurs as described above, or until Sq3StmtStep () or Sq3StmtReset () or Sq3StmtFinalize () is called. The memory space used to hold strings and BLOBs is freed automatically. Do not pass the pointers returned from Sq3StmtColumnBlob (), Sq3StmtColumnText (), etc. into Sq3Free ().
As long as the input parameters are correct, these routines will only fail if an out-of-memory error occurs during a format conversion. Only the following subset of interfaces are subject to out-of-memory errors:
If an out-of-memory error occurs, then the return value from these routines is the same as if the column had contained an SQL NULL value. Valid SQL NULL returns can be distinguished from out-of-memory errors by invoking the Sq3LiteErrCode () immediately after the suspect return value is obtained and before any other SQLite interface is called on the same database connection.
Reference code from sqlite3:
SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *, int iCol)
sqlite_int64 sqlite3_int64
#define SQLITE_API
SQLITE_API double sqlite3_column_double(sqlite3_stmt *, int iCol)
SQLITE_API int sqlite3_column_type(sqlite3_stmt *, int iCol)
SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt *, int iCol)
SQLITE_API int sqlite3_column_int(sqlite3_stmt *, int iCol)
SQLITE_API const void * sqlite3_column_text16(sqlite3_stmt *, int iCol)
struct sqlite3_value sqlite3_value
SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *, int iCol)
SQLITE_API const void * sqlite3_column_blob(sqlite3_stmt *, int iCol)
SQLITE_API const unsigned char * sqlite3_column_text(sqlite3_stmt *, int iCol)
struct sqlite3_stmt sqlite3_stmt
SQLITE_API sqlite3_value * sqlite3_column_value(sqlite3_stmt *, int iCol)

Definition at line 669 of file Sq3StmtC_sq3.h.

669 {
670 SQ3_INSTANCE_HDL(sq3stmt);
671 MK_BINN bin = Sq3StmtColumnBlobHide(sq3stmt,iCol);
672 return MkBinaryCreate(Sq3StmtColumnBytes(sq3stmt,iCol),bin);
673}
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
MK_BINB const * MK_BINN
#define SQ3_INSTANCE_HDL(x)
static MK_BINN Sq3StmtColumnBlobHide(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
static MK_I32 Sq3StmtColumnBytes(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
+ Here is the caller graph for this function:

◆ Sq3StmtColumnBlobHide()

static MK_BINN Sq3StmtColumnBlobHide ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

Summary:

sqlite3_column_blobBLOB result
sqlite3_column_doubleREAL result
sqlite3_column_int32-bit INTEGER result
sqlite3_column_int6464-bit INTEGER result
sqlite3_column_textUTF-8 TEXT result
sqlite3_column_text16UTF-16 TEXT result
sqlite3_column_valueThe result as an Sq3ValueC object.
   
sqlite3_column_bytesSize of a BLOB or a UTF-8 TEXT result in bytes
sqlite3_column_bytes16   →  Size of UTF-16 TEXT in bytes
sqlite3_column_typeDefault datatype of the result

Details:

These routines return information about a single column of the current result row of a query. In every case the first argument is a pointer to the prepared statement that is being evaluated (the Sq3StmtC* that was returned from Sq3StmtPrepareV2 () or one of its variants) and the second argument is the index of the column for which information should be returned. The leftmost column of the result set has the index 0. The number of columns in the result can be determined using Sq3StmtColumnCount ().

If the SQL statement does not currently point to a valid row, or if the column index is out of range, the result is undefined. These routines may only be called when the most recent call to Sq3StmtStep () has returned SQ3_RESULT_ROW and neither Sq3StmtReset () nor Sq3StmtFinalize () have been called subsequently. If any of these routines are called after Sq3StmtReset () or Sq3StmtFinalize () or after Sq3StmtStep () has returned something other than SQ3_RESULT_ROW, the results are undefined. If Sq3StmtStep () or Sq3StmtReset () or Sq3StmtFinalize () are called from a different thread while any of these routines are pending, then the results are undefined.

The first six interfaces (_blob, _double, _int, _int64, _text, and _text16) each return the value of a result column in a specific data format. If the result column is not initially in the requested format (for example, if the query returns an integer but the Sq3StmtColumnText() interface is used to extract the value) then an automatic type conversion is performed.

The Sq3StmtColumnType() routine returns the datatype code for the initial data type of the result column. The returned value is one of SQ3_TYPE_INTEGER, SQ3_TYPE_FLOAT, SQ3_TYPE_TEXT, SQ3_TYPE_BLOB, or SQ3_TYPE_NULL. The return value of Sq3StmtColumnType() can be used to decide which of the first six interface should be used to extract the column value. The value returned by Sq3StmtColumnType() is only meaningful if no automatic type conversions have occurred for the value in question. After a type conversion, the result of calling Sq3StmtColumnType() is undefined, though harmless. Future versions of SQLite may change the behavior of Sq3StmtColumnType() following a type conversion.

If the result is a BLOB or a TEXT string, then the Sq3StmtColumnBytes() or sqlite3_column_bytes16() interfaces can be used to determine the size of that BLOB or string.

If the result is a BLOB or UTF-8 string then the Sq3StmtColumnBytes() routine returns the number of bytes in that BLOB or string. If the result is a UTF-16 string, then Sq3StmtColumnBytes() converts the string to UTF-8 and then returns the number of bytes. If the result is a numeric value then Sq3StmtColumnBytes() uses sqlite3_snprintf () to convert that value to a UTF-8 string and returns the number of bytes in that string. If the result is NULL, then Sq3StmtColumnBytes() returns zero.

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. 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. 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. If the result is NULL, then sqlite3_column_bytes16() returns zero.

The values returned by Sq3StmtColumnBytes () and sqlite3_column_bytes16 () do not include the zero terminators at the end of the string. For clarity: the values returned by Sq3StmtColumnBytes () and sqlite3_column_bytes16 () are the number of bytes in the string, not the number of characters.

Strings returned by Sq3StmtColumnText() and sqlite3_column_text16(), even empty strings, are always zero-terminated. The return value from Sq3StmtColumnBlob() for a zero-length BLOB is a NULL pointer.

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.

Warning: The object returned by Sq3StmtColumnValue () is an unprotected Sq3ValueC object. In a multithreaded environment, an unprotected Sq3ValueC object may only be used safely with Sq3StmtBindValue () and sqlite3_result_value (). If the unprotected Sq3ValueC object returned by Sq3StmtColumnValue () is used in any other way, including calls to routines like Sq3ValueInt (), Sq3ValueText (), or Sq3ValueBytes (), the behavior is not threadsafe. Hence, the Sq3StmtColumnValue() interface is normally only useful within the implementation of application-defined SQL functions or virtual tables, not within top-level application code.

These routines may attempt to convert the datatype of the result. For example, if the internal representation is FLOAT and a text result is requested, sqlite3_snprintf () is used internally to perform the conversion automatically. 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

Note that when type conversions occur, pointers returned by prior calls to Sq3StmtColumnBlob(), Sq3StmtColumnText(), and/or sqlite3_column_text16() may be invalidated. Type conversions and pointer invalidations might occur in the following cases:

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. Other kinds of conversion are done in place when it is possible, but sometimes they are not possible and in those cases prior pointers are invalidated.

The safest policy is to invoke these routines in one of the following ways:

In other words, you should call Sq3StmtColumnText(), Sq3StmtColumnBlob(), or sqlite3_column_text16() first to force the result into the desired format, then invoke Sq3StmtColumnBytes() or sqlite3_column_bytes16() to find the size of the result. Do not mix calls to Sq3StmtColumnText() or Sq3StmtColumnBlob() with calls to sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() with calls to Sq3StmtColumnBytes().

The pointers returned are valid until a type conversion occurs as described above, or until Sq3StmtStep () or Sq3StmtReset () or Sq3StmtFinalize () is called. The memory space used to hold strings and BLOBs is freed automatically. Do not pass the pointers returned from Sq3StmtColumnBlob (), Sq3StmtColumnText (), etc. into Sq3Free ().

As long as the input parameters are correct, these routines will only fail if an out-of-memory error occurs during a format conversion. Only the following subset of interfaces are subject to out-of-memory errors:

If an out-of-memory error occurs, then the return value from these routines is the same as if the column had contained an SQL NULL value. Valid SQL NULL returns can be distinguished from out-of-memory errors by invoking the Sq3LiteErrCode () immediately after the suspect return value is obtained and before any other SQLite interface is called on the same database connection.

Reference code from sqlite3:

Definition at line 237 of file Sq3StmtC_sq3.h.

237 {
238 SQ3_INSTANCE_HDL(sq3stmt);
239 return (MK_BINN)sqlite3_column_blob(sq3stmt->nat, iCol);
240 }
sqlite3_stmt * nat
internal - link between Sq3StmtS and native library
+ Here is the caller graph for this function:

◆ Sq3StmtColumnBlobHideP()

MK_BINN Sq3StmtColumnBlobHideP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnBlobHide

◆ Sq3StmtColumnBlobP()

MkBinaryR Sq3StmtColumnBlobP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnBlob

◆ Sq3StmtColumnBytes()

static MK_I32 Sq3StmtColumnBytes ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 243 of file Sq3StmtC_sq3.h.

243 {
244 SQ3_INSTANCE_HDL(sq3stmt);
245 return sqlite3_column_bytes(sq3stmt->nat, iCol);
246 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnBytesP()

MK_I32 Sq3StmtColumnBytesP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnBytes

◆ Sq3StmtColumnCount()

static MK_I32 Sq3StmtColumnCount ( SQ3_STMT pStmt)
inlinestatic

Number Of Columns In A Result Set …

Return the number of columns in the result set returned by the prepared statement. If this routine returns 0, that means the prepared statement returns no data (for example an UPDATE). However, just because this routine returns a positive number does not mean that one or more rows of data will be returned. A SELECT statement will always have a positive Sq3StmtColumnCount() but depending on the WHERE clause constraints and the table content, it might return no rows.

See also: Sq3StmtDataCount ()

Reference code from sqlite3:

SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt)

Definition at line 249 of file Sq3StmtC_sq3.h.

249 {
250 SQ3_INSTANCE_HDL(pStmt);
251 return sqlite3_column_count(pStmt->nat);
252 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnCountP()

MK_I32 Sq3StmtColumnCountP ( SQ3_STMT pStmt)

Non-inline replacement for Sq3StmtColumnCount

◆ Sq3StmtColumnDouble()

static MK_DBL Sq3StmtColumnDouble ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 255 of file Sq3StmtC_sq3.h.

255 {
256 SQ3_INSTANCE_HDL(sq3stmt);
257 return sqlite3_column_double(sq3stmt->nat, iCol);
258 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnDoubleP()

MK_DBL Sq3StmtColumnDoubleP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnDouble

◆ Sq3StmtColumnInt()

static MK_I32 Sq3StmtColumnInt ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 261 of file Sq3StmtC_sq3.h.

261 {
262 SQ3_INSTANCE_HDL(sq3stmt);
263 return sqlite3_column_int(sq3stmt->nat, iCol);
264 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnInt64()

static MK_I64 Sq3StmtColumnInt64 ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 267 of file Sq3StmtC_sq3.h.

267 {
268 SQ3_INSTANCE_HDL(sq3stmt);
269 return sqlite3_column_int64(sq3stmt->nat, iCol);
270 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnInt64P()

MK_I64 Sq3StmtColumnInt64P ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnInt64

◆ Sq3StmtColumnIntP()

MK_I32 Sq3StmtColumnIntP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnInt

◆ Sq3StmtColumnName()

static MK_STRN Sq3StmtColumnName ( SQ3_STMT sq3stmt,
MK_I32 N )
inlinestatic

Column Names In A Result Set …

These routines return the name assigned to a particular column in the result set of a SELECT statement. The Sq3StmtColumnName() interface returns a pointer to a zero-terminated UTF-8 string and sqlite3_column_name16() returns a pointer to a zero-terminated UTF-16 string. The first parameter is the prepared statement that implements the SELECT statement. The second parameter is the column number. The leftmost column is number 0.

The returned string pointer is valid until either the prepared statement is destroyed by Sq3StmtFinalize () or until the statement is automatically reprepared by the first call to Sq3StmtStep () for a particular run or until the next call to Sq3StmtColumnName() or sqlite3_column_name16() on the same column.

If Sq3Malloc() fails during the processing of either routine (for example during a conversion from UTF-8 to UTF-16) then a NULL pointer is returned.

The name of a result column is the value of the "AS" clause for that column, if there is an AS clause. If there is no AS clause then the name of the column is unspecified and may change from one release of SQLite to the next.

Reference code from sqlite3:

SQLITE_API const void * sqlite3_column_name16(sqlite3_stmt *, int N)
SQLITE_API const char * sqlite3_column_name(sqlite3_stmt *, int N)

Definition at line 273 of file Sq3StmtC_sq3.h.

273 {
274 SQ3_INSTANCE_HDL(sq3stmt);
275 MK_STRN __retVal__L = sqlite3_column_name(sq3stmt->nat, N);
276 return __retVal__L;
277 }
const MK_STRB * MK_STRN
+ Here is the caller graph for this function:

◆ Sq3StmtColumnNameP()

MK_STRN Sq3StmtColumnNameP ( SQ3_STMT sq3stmt,
MK_I32 N )

Non-inline replacement for Sq3StmtColumnName

◆ Sq3StmtColumnText()

static MkStringR Sq3StmtColumnText ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result a MkStringR Value From A Query.

This is an enhanced version of Sq3StmtColumnTextHide using the Programming-Language-Micro-Kernel (PLMK) definition of a text called MkStringR as return-value.

Parameters
[in]sq3stmtthe Sq3StmtC instance to work on a statement
[in]iColIs the index of the column for which information should be returned. The leftmost column of the result set has the index 0.
Returns
The MkStringR value requested

Sq3StmtColumnTextHide : documentation

Result Values From A Query …

Definition at line 688 of file Sq3StmtC_sq3.h.

688 {
689 SQ3_INSTANCE_HDL(sq3stmt);
690 MK_STRN str = Sq3StmtColumnTextHide(sq3stmt,iCol);
691 return MkStringCreate(Sq3StmtColumnBytes(sq3stmt,iCol),str);
692}
static MkStringR MkStringCreate(MK_NUM len, MK_STRN str)
static MK_STRN Sq3StmtColumnTextHide(SQ3_STMT sq3stmt, MK_I32 iCol)
Result Values From A Query …
+ Here is the caller graph for this function:

◆ Sq3StmtColumnTextHide()

static MK_STRN Sq3StmtColumnTextHide ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 280 of file Sq3StmtC_sq3.h.

280 {
281 SQ3_INSTANCE_HDL(sq3stmt);
282 MK_STRN __retVal__L = (MK_STRN)sqlite3_column_text(sq3stmt->nat, iCol);
283 return __retVal__L;
284 }
+ Here is the caller graph for this function:

◆ Sq3StmtColumnTextHideP()

MK_STRN Sq3StmtColumnTextHideP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnTextHide

◆ Sq3StmtColumnTextP()

MkStringR Sq3StmtColumnTextP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnText

◆ Sq3StmtColumnType()

static enum Sq3TypeE Sq3StmtColumnType ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 287 of file Sq3StmtC_sq3.h.

287 {
288 SQ3_INSTANCE_HDL(sq3stmt);
289 return (enum Sq3TypeE)sqlite3_column_type(sq3stmt->nat, iCol);
290 }
Sq3TypeE
Fundamental Datatypes.
+ Here is the caller graph for this function:

◆ Sq3StmtColumnTypeP()

enum Sq3TypeE Sq3StmtColumnTypeP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnType

◆ Sq3StmtColumnValue()

static SQ3_VAL Sq3StmtColumnValue ( SQ3_STMT sq3stmt,
MK_I32 iCol )
inlinestatic

Result Values From A Query …

read more at 'Sq3StmtColumnBlob'

Definition at line 229 of file Sq3StmtC_sq3.h.

229 {
230 SQ3_INSTANCE_HDL(sq3stmt);
231 return Sq3ValueC_ObjNew(sqlite3_column_value(sq3stmt->nat, iCol));
232 }
static MK_ARTIFICIAL SQ3_VAL Sq3ValueC_ObjNew(sqlite3_value *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
+ Here is the caller graph for this function:

◆ Sq3StmtColumnValueP()

SQ3_VAL Sq3StmtColumnValueP ( SQ3_STMT sq3stmt,
MK_I32 iCol )

Non-inline replacement for Sq3StmtColumnValue