stmt Struct Reference

Driver internal structure representing SQL statement (HSTMT). More...

#include <sqlite3odbc.h>

Data Fields

struct stmtnext
 Linkage for STMT list in DBC.
 
HDBC dbc
 Pointer to DBC.
 
SQLCHAR cursorname [32]
 Cursor name.
 
SQLCHAR * query
 Current query, raw string.
 
int * ov3
 True for SQL_OV_ODBC3.
 
int * oemcp
 True for Win32 OEM CP translation.
 
int * jdconv
 True for julian day conversion.
 
int * ilike
 True for ILIKE fixup.
 
int isselect
 
int ncols
 Number of result columns.
 
COLcols
 Result column array.
 
COLdyncols
 Column array, but malloc()ed.
 
int dcols
 Number of entries in dyncols.
 
int bkmrk
 True when bookmarks used.
 
SQLINTEGER * bkmrkptr
 SQL_ATTR_FETCH_BOOKMARK_PTR.
 
BINDCOL bkmrkcol
 Bookmark bound column.
 
BINDCOLbindcols
 Array of bound columns.
 
int nbindcols
 Number of entries in bindcols.
 
int nbindparms
 Number bound parameters.
 
BINDPARMbindparms
 Array of bound parameters.
 
int nparams
 Number of parameters in query.
 
int pdcount
 SQLParamData() counter.
 
int nrows
 Number of result rows.
 
int rowp
 Current result row.
 
int rowprs
 Current start row of rowset.
 
char ** rows
 2-dim array, result set
 
void(* rowfree )()
 Free function for rows.
 
int naterr
 Native error code.
 
char sqlstate [6]
 SQL state for SQLError()
 
SQLCHAR logmsg [1024]
 Message for SQLError()
 
int nowchar [2]
 Don't try to use WCHAR.
 
int dobigint
 Force SQL_BIGINT for INTEGER columns.
 
int longnames
 Don't shorten column names.
 
SQLULEN retr_data
 SQL_ATTR_RETRIEVE_DATA.
 
SQLULEN rowset_size
 Size of rowset.
 
SQLUSMALLINT * row_status
 Row status pointer.
 
SQLUSMALLINT * row_status0
 Internal status array.
 
SQLUSMALLINT row_status1
 Internal status array for 1 row rowsets.
 
SQLULENrow_count
 Row count pointer.
 
SQLULEN row_count0
 Row count.
 
SQLULEN paramset_size
 SQL_ATTR_PARAMSET_SIZE.
 
SQLULEN paramset_count
 Internal for paramset.
 
SQLUINTEGER paramset_nrows
 Row count for paramset handling.
 
SQLULEN max_rows
 SQL_ATTR_MAX_ROWS.
 
SQLULEN bind_type
 SQL_ATTR_ROW_BIND_TYPE.
 
SQLULENbind_offs
 SQL_ATTR_ROW_BIND_OFFSET_PTR.
 
SQLULENparm_bind_offs
 SQL_ATTR_PARAM_BIND_OFFSET_PTR.
 
SQLUSMALLINT * parm_oper
 SQL_ATTR_PARAM_OPERATION_PTR.
 
SQLUSMALLINT * parm_status
 SQL_ATTR_PARAMS_STATUS_PTR.
 
SQLULENparm_proc
 SQL_ATTR_PARAMS_PROCESSED_PTR.
 
SQLULEN parm_bind_type
 SQL_ATTR_PARAM_BIND_TYPE.
 
int curtype
 Cursor type.
 
sqlite3_stmt * s3stmt
 SQLite statement handle or NULL.
 
int s3stmt_noreset
 False when sqlite3_reset() needed.
 
int s3stmt_rownum
 Current row number.
 
char * bincell
 Cache for blob data.
 
char * bincache
 Cache for blob data.
 
int binlen
 Length of blob data.
 
int guessed_types
 Flag for drvprepare()/drvexecute()
 
int one_tbl
 Flag for single table (> 0)
 
int has_pk
 Flag for primary key (> 0)
 
int has_rowid
 Flag for ROWID (>= 0 or -1)
 

Detailed Description

Driver internal structure representing SQL statement (HSTMT).

Definition at line 232 of file sqlite3odbc.h.

Field Documentation

◆ bincache

char* stmt::bincache

Cache for blob data.

Definition at line 290 of file sqlite3odbc.h.

Referenced by freeresult(), and getrowdata().

◆ bincell

char* stmt::bincell

Cache for blob data.

Definition at line 289 of file sqlite3odbc.h.

Referenced by freeresult(), and getrowdata().

◆ bind_offs

SQLULEN* stmt::bind_offs

SQL_ATTR_ROW_BIND_OFFSET_PTR.

Definition at line 278 of file sqlite3odbc.h.

Referenced by dofetchbind(), drvallocstmt(), drvbulkoperations(), drvgetstmtattr(), drvsetstmtattr(), setposbind(), and setposrefr().

◆ bind_type

SQLULEN stmt::bind_type

SQL_ATTR_ROW_BIND_TYPE.

Definition at line 277 of file sqlite3odbc.h.

Referenced by dofetchbind(), drvallocstmt(), drvbulkoperations(), drvgetstmtattr(), drvsetstmtattr(), setposbind(), and setposrefr().

◆ bindcols

◆ bindparms

BINDPARM* stmt::bindparms

Array of bound parameters.

Definition at line 252 of file sqlite3odbc.h.

Referenced by drvbindparam(), drvputdata(), freeparams(), freestmt(), s3stmt_start(), setupparam(), and SQLParamData().

◆ binlen

int stmt::binlen

Length of blob data.

Definition at line 291 of file sqlite3odbc.h.

Referenced by freeresult(), and getrowdata().

◆ bkmrk

int stmt::bkmrk

True when bookmarks used.

Definition at line 246 of file sqlite3odbc.h.

Referenced by dofetchbind(), drvallocstmt(), drvbindcol(), drvbulkoperations(), drvfetchscroll(), drvgetstmtattr(), drvsetstmtattr(), and SQLGetData().

◆ bkmrkcol

BINDCOL stmt::bkmrkcol

Bookmark bound column.

Definition at line 248 of file sqlite3odbc.h.

Referenced by dofetchbind(), drvbindcol(), and drvbulkoperations().

◆ bkmrkptr

SQLINTEGER* stmt::bkmrkptr

SQL_ATTR_FETCH_BOOKMARK_PTR.

Definition at line 247 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvfetchscroll(), drvgetstmtattr(), drvsetstmtattr(), and SQLExtendedFetch().

◆ cols

◆ cursorname

SQLCHAR stmt::cursorname[32]

Cursor name.

Definition at line 235 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvgetcursorname(), and drvsetcursorname().

◆ curtype

int stmt::curtype

◆ dbc

◆ dcols

int stmt::dcols

Number of entries in dyncols.

Definition at line 245 of file sqlite3odbc.h.

Referenced by fixupdyncols(), freedyncols(), and s3stmt_step().

◆ dobigint

int stmt::dobigint

Force SQL_BIGINT for INTEGER columns.

Definition at line 264 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvcolumns(), drvspecialcolumns(), and fixupdyncols().

◆ dyncols

COL* stmt::dyncols

Column array, but malloc()ed.

Definition at line 244 of file sqlite3odbc.h.

Referenced by drvbulkoperations(), drvsetpos(), fixupdyncols(), freedyncols(), and s3stmt_step().

◆ guessed_types

int stmt::guessed_types

Flag for drvprepare()/drvexecute()

Definition at line 292 of file sqlite3odbc.h.

Referenced by drvgettable_row().

◆ has_pk

int stmt::has_pk

Flag for primary key (> 0)

Definition at line 294 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvsetpos(), fixupdyncols(), and freeresult().

◆ has_rowid

int stmt::has_rowid

Flag for ROWID (>= 0 or -1)

Definition at line 295 of file sqlite3odbc.h.

Referenced by dofetchbind(), drvallocstmt(), drvbulkoperations(), drvfetchscroll(), fixupdyncols(), freeresult(), and SQLGetData().

◆ ilike

int* stmt::ilike

True for ILIKE fixup.

Definition at line 240 of file sqlite3odbc.h.

Referenced by drvallocstmt().

◆ isselect

int stmt::isselect

‍0 if query is a SELECT statement

Definition at line 241 of file sqlite3odbc.h.

Referenced by drvbulkoperations(), drvfetchscroll(), drvgetdiagfield(), drvsetpos(), mkresultset(), and SQLRowCount().

◆ jdconv

int* stmt::jdconv

True for julian day conversion.

Definition at line 239 of file sqlite3odbc.h.

Referenced by drvallocstmt(), getrowdata(), setposbind(), and setupparam().

◆ logmsg

SQLCHAR stmt::logmsg[1024]

Message for SQLError()

Definition at line 262 of file sqlite3odbc.h.

Referenced by drvgetdiagfield(), drvgetdiagrec(), and setstat().

◆ longnames

int stmt::longnames

Don't shorten column names.

Definition at line 265 of file sqlite3odbc.h.

Referenced by drvallocstmt(), fixupdyncols(), and s3stmt_step().

◆ max_rows

SQLULEN stmt::max_rows

◆ naterr

int stmt::naterr

Native error code.

Definition at line 260 of file sqlite3odbc.h.

Referenced by drvgetdiagfield(), drvgetdiagrec(), and setstat().

◆ nbindcols

int stmt::nbindcols

Number of entries in bindcols.

Definition at line 250 of file sqlite3odbc.h.

Referenced by chkunbound(), freeresult(), mkbindcols(), and unbindcols().

◆ nbindparms

int stmt::nbindparms

Number bound parameters.

Definition at line 251 of file sqlite3odbc.h.

Referenced by drvbindparam(), freeparams(), and setupparam().

◆ ncols

◆ next

struct stmt* stmt::next

Linkage for STMT list in DBC.

Definition at line 233 of file sqlite3odbc.h.

Referenced by drvallocstmt(), and freestmt().

◆ nowchar

◆ nparams

int stmt::nparams

Number of parameters in query.

Definition at line 253 of file sqlite3odbc.h.

Referenced by drvputdata(), s3stmt_start(), SQLDescribeParam(), SQLNumParams(), and SQLParamData().

◆ nrows

◆ oemcp

int* stmt::oemcp

True for Win32 OEM CP translation.

Definition at line 238 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvputdata(), getrowdata(), setposbind(), and setupparam().

◆ one_tbl

int stmt::one_tbl

Flag for single table (> 0)

Definition at line 293 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvbulkoperations(), drvsetpos(), fixupdyncols(), and freeresult().

◆ ov3

◆ paramset_count

SQLULEN stmt::paramset_count

Internal for paramset.

Definition at line 274 of file sqlite3odbc.h.

Referenced by drvsetstmtattr().

◆ paramset_nrows

SQLUINTEGER stmt::paramset_nrows

Row count for paramset handling.

Definition at line 275 of file sqlite3odbc.h.

◆ paramset_size

SQLULEN stmt::paramset_size

SQL_ATTR_PARAMSET_SIZE.

Definition at line 273 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvgetstmtattr(), and drvsetstmtattr().

◆ parm_bind_offs

SQLULEN* stmt::parm_bind_offs

SQL_ATTR_PARAM_BIND_OFFSET_PTR.

Definition at line 280 of file sqlite3odbc.h.

Referenced by drvgetstmtattr(), and drvsetstmtattr().

◆ parm_bind_type

SQLULEN stmt::parm_bind_type

SQL_ATTR_PARAM_BIND_TYPE.

Definition at line 284 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvgetstmtattr(), and drvsetstmtattr().

◆ parm_oper

SQLUSMALLINT* stmt::parm_oper

SQL_ATTR_PARAM_OPERATION_PTR.

Definition at line 281 of file sqlite3odbc.h.

Referenced by drvgetstmtattr(), and drvsetstmtattr().

◆ parm_proc

SQLULEN* stmt::parm_proc

SQL_ATTR_PARAMS_PROCESSED_PTR.

Definition at line 283 of file sqlite3odbc.h.

Referenced by drvgetstmtattr(), and drvsetstmtattr().

◆ parm_status

SQLUSMALLINT* stmt::parm_status

SQL_ATTR_PARAMS_STATUS_PTR.

Definition at line 282 of file sqlite3odbc.h.

Referenced by drvgetstmtattr(), and drvsetstmtattr().

◆ pdcount

int stmt::pdcount

SQLParamData() counter.

Definition at line 254 of file sqlite3odbc.h.

Referenced by drvputdata(), and SQLParamData().

◆ query

SQLCHAR* stmt::query

Current query, raw string.

Definition at line 236 of file sqlite3odbc.h.

Referenced by drvputdata(), freestmt(), and s3stmt_start().

◆ retr_data

SQLULEN stmt::retr_data

SQL_ATTR_RETRIEVE_DATA.

Definition at line 266 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvgetstmtattr(), drvgetstmtoption(), drvsetstmtattr(), drvsetstmtoption(), and getrowdata().

◆ row_count

SQLULEN* stmt::row_count

Row count pointer.

Definition at line 271 of file sqlite3odbc.h.

Referenced by drvfetchscroll(), drvgetstmtattr(), and drvsetstmtattr().

◆ row_count0

SQLULEN stmt::row_count0

Row count.

Definition at line 272 of file sqlite3odbc.h.

Referenced by drvfetchscroll(), and SQLExtendedFetch().

◆ row_status

SQLUSMALLINT* stmt::row_status

Row status pointer.

Definition at line 268 of file sqlite3odbc.h.

Referenced by drvbulkoperations(), drvfetchscroll(), drvgetstmtattr(), drvsetpos(), drvsetstmtattr(), and SQLExtendedFetch().

◆ row_status0

SQLUSMALLINT* stmt::row_status0

◆ row_status1

SQLUSMALLINT stmt::row_status1

Internal status array for 1 row rowsets.

Definition at line 270 of file sqlite3odbc.h.

Referenced by drvallocstmt(), drvsetstmtattr(), drvsetstmtoption(), and freestmt().

◆ rowfree

void(* stmt::rowfree) ()

◆ rowp

◆ rowprs

int stmt::rowprs

Current start row of rowset.

Definition at line 257 of file sqlite3odbc.h.

Referenced by drvfetchscroll(), drvtableprivileges(), drvtables(), mkresultset(), setposibind(), and setposrefr().

◆ rows

◆ rowset_size

◆ s3stmt

sqlite3_stmt* stmt::s3stmt

SQLite statement handle or NULL.

Definition at line 286 of file sqlite3odbc.h.

Referenced by drvfetchscroll(), drvgetstmtattr(), drvgetstmtoption(), drvgettable(), s3stmt_drop(), s3stmt_end(), s3stmt_start(), and s3stmt_step().

◆ s3stmt_noreset

int stmt::s3stmt_noreset

False when sqlite3_reset() needed.

Definition at line 287 of file sqlite3odbc.h.

Referenced by drvgettable(), s3stmt_end(), s3stmt_start(), and s3stmt_step().

◆ s3stmt_rownum

int stmt::s3stmt_rownum

Current row number.

Definition at line 288 of file sqlite3odbc.h.

Referenced by drvfetchscroll(), drvgetstmtattr(), drvgetstmtoption(), s3stmt_drop(), s3stmt_end(), s3stmt_start(), and s3stmt_step().

◆ sqlstate

char stmt::sqlstate[6]

SQL state for SQLError()

Definition at line 261 of file sqlite3odbc.h.

Referenced by drvgetdiagfield(), drvgetdiagrec(), and setstat().


The documentation for this struct was generated from the following file:

Generated on Sun Nov 26 2023 by doxygen.
Contact: chw@ch-werner.de