Copyright (c) 2001-2004 Christian Werner <chw@ch-werner.de>
See the file "license.terms" for information on usage and redistribution of this file and for a DISCLAIMER OF ALL WARRANTIES.
Definition in file sqliteodbc.c.
#include "sqliteodbc.h"
Go to the source code of this file.
Defines | |
#define | ODBC_INI ".odbc.ini" |
#define | DRIVER_VER_INFO "0.0" |
#define | min(a, b) ((a) < (b) ? (a) : (b)) |
#define | max(a, b) ((a) < (b) ? (b) : (a)) |
#define | array_size(x) (sizeof (x) / sizeof (x[0])) |
#define | stringify1(s) #s |
#define | stringify(s) stringify1(s) |
#define | verinfo(maj, min, lev) ((maj) << 16 | (min) << 8 | (lev)) |
#define | SCOL_VARCHAR SQL_VARCHAR |
#define | SCOL_CHAR SQL_CHAR |
#define | ENV_MAGIC 0x53544145 |
#define | DBC_MAGIC 0x53544144 |
#define | DEAD_MAGIC 0xdeadbeef |
#define | xmalloc(x) malloc(x) |
#define | xrealloc(x, y) realloc(x, y) |
#define | xfree(x) free(x) |
#define | xstrdup(x) strdup_(x) |
#define | ISDIGIT(c) ((c) && strchr(digit_chars, (c)) != NULL) |
#define | ISSPACE(c) ((c) && strchr(space_chars, (c)) != NULL) |
#define | ISIDCHAR(c) ((c) && strchr(id_chars, (c)) != NULL) |
#define | drvgetgpps(d) |
#define | drvrelgpps(d) |
#define | dbtracerc(a, b, c) |
#define | strmak(dst, src, max, lenp) |
#define | SET_EXISTS(x) flags[(x) >> 4] |= (1 << ((x) & 0xF)) |
#define | CLR_EXISTS(x) flags[(x) >> 4] &= ~(1 << ((x) & 0xF)) |
Functions | |
int | TOLOWER (int c) |
void | unbindcols (STMT *s) |
Reset bound columns to unbound state. | |
SQLRETURN | mkbindcols (STMT *s, int ncols) |
Reallocate space for bound columns. | |
void | freeresult (STMT *s, int clrcols) |
Free statement's result. | |
SQLRETURN | freestmt (HSTMT stmt) |
Internal free function for HSTMT. | |
SQLRETURN | substparam (STMT *s, int pnum, char **out, int *size) |
Substitute parameter for statement. | |
void | freedyncols (STMT *s) |
Free dynamically allocated column descriptions of STMT. | |
SQLRETURN | drvexecute (SQLHSTMT stmt) |
Internal query execution used by SQLExecute() and SQLExecDirect(). | |
char * | strdup_ (const char *str) |
Duplicate string using xmalloc(). | |
void | setstatd (DBC *d, int naterr, char *msg, char *st,...) |
Set error message and SQL state on DBC. | |
void | setstat (STMT *s, int naterr, char *msg, char *st,...) |
Set error message and SQL state on statement. | |
SQLRETURN | drvunimpldbc (HDBC dbc) |
Report IM001 (not implemented) SQL error code for HDBC. | |
SQLRETURN | drvunimplstmt (HSTMT stmt) |
Report IM001 (not implemented) SQL error code for HSTMT. | |
void | freep (void *x) |
Free memory given pointer to memory pointer. | |
SQLRETURN | nomem (STMT *s) |
Report S1000 (out of memory) SQL error given STMT. | |
SQLRETURN | noconn (STMT *s) |
Report S1000 (not connected) SQL error given STMT. | |
double | ln_strtod (const char *data, char **endp) |
Internal locale neutral strtod function. | |
void | ln_sprintfg (char *buf, double value) |
Internal locale neutral sprintf("%g") function. | |
int | busy_handler (void *udata, const char *table, int count) |
Busy callback for SQLite. | |
int | setsqliteopts (sqlite *x, DBC *d) |
Set SQLite options (PRAGMAs) given SQLite handle. | |
void | freerows (char **rowp) |
Free counted array of char pointers. | |
int | mapsqltype (const char *typename, int *nosign, int ov3, int nowchar) |
Map SQL field type from string to ODBC integer type code. | |
void | getmd (const char *typename, int sqltype, int *mp, int *dp) |
Get maximum display size and number of decimal points from field type specification. | |
int | mapdeftype (int type, int stype, int nosign, int nowchar) |
Map SQL_C_DEFAULT to proper C type. | |
char * | fixupsql (char *sql, int sqlLen, int *nparam, int *isselect, char **errmsg, int version, char ***namepp) |
Fixup query string with optional parameter markers. | |
int | findcol (char **cols, int ncols, char *name) |
Find column given name in string array. | |
void | fixupdyncols (STMT *s, sqlite *sqlite, const char **types) |
Fixup column information for a running statement. | |
int | getmdays (int year, int month) |
Return number of month days. | |
int | str2date (char *str, DATE_STRUCT *ds) |
Convert string to ODBC DATE_STRUCT. | |
int | str2time (char *str, TIME_STRUCT *ts) |
Convert string to ODBC TIME_STRUCT. | |
int | str2timestamp (char *str, TIMESTAMP_STRUCT *tss) |
Convert string to ODBC TIMESTAMP_STRUCT. | |
int | getbool (char *string) |
Get boolean flag from string. | |
SQLRETURN | dbopen (DBC *d, char *name, char *dsn, char *sflag, char *busy) |
Open SQLite database file given file name and flags. | |
int | vm_step (STMT *s) |
Do one VM step gathering one result row. | |
void | vm_end (STMT *s) |
Stop running VM. | |
void | vm_end_if (STMT *s) |
Conditionally stop running VM. | |
SQLRETURN | vm_start (STMT *s, char **params) |
Start VM for execution of SELECT statement. | |
SQLRETURN SQL_API | SQLBulkOperations (SQLHSTMT stmt, SQLSMALLINT oper) |
Function not implemented. | |
SQLRETURN SQL_API | SQLDataSources (SQLHENV env, SQLUSMALLINT dir, SQLCHAR *srvname, SQLSMALLINT buflen1, SQLSMALLINT *lenp1, SQLCHAR *desc, SQLSMALLINT buflen2, SQLSMALLINT *lenp2) |
Function not implemented. | |
SQLRETURN SQL_API | SQLDrivers (SQLHENV env, SQLUSMALLINT dir, SQLCHAR *drvdesc, SQLSMALLINT descmax, SQLSMALLINT *desclenp, SQLCHAR *drvattr, SQLSMALLINT attrmax, SQLSMALLINT *attrlenp) |
Function not implemented. | |
SQLRETURN SQL_API | SQLBrowseConnect (SQLHDBC dbc, SQLCHAR *connin, SQLSMALLINT conninLen, SQLCHAR *connout, SQLSMALLINT connoutMax, SQLSMALLINT *connoutLen) |
Function not implemented. | |
void | time_func (sqlite_func *context, int argc, const char **argv) |
SQLite function "current_time_local" etc. | |
SQLRETURN SQL_API | SQLPutData (SQLHSTMT stmt, SQLPOINTER data, SQLINTEGER len) |
Put (partial) parameter data into executing statement. | |
SQLRETURN | freeparams (STMT *s) |
Clear out parameter bindings, if any. | |
SQLRETURN | drvbindparam (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT iotype, SQLSMALLINT buftype, SQLSMALLINT ptype, SQLUINTEGER coldef, SQLSMALLINT scale, SQLPOINTER data, SQLINTEGER buflen, SQLINTEGER *len) |
Internal bind parameter on HSTMT. | |
SQLRETURN SQL_API | SQLBindParameter (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT iotype, SQLSMALLINT buftype, SQLSMALLINT ptype, SQLUINTEGER coldef, SQLSMALLINT scale, SQLPOINTER data, SQLINTEGER buflen, SQLINTEGER *len) |
Bind parameter on HSTMT. | |
SQLRETURN SQL_API | SQLBindParam (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT vtype, SQLSMALLINT ptype, SQLUINTEGER lenprec, SQLSMALLINT scale, SQLPOINTER val, SQLINTEGER *lenp) |
Bind parameter on HSTMT. | |
SQLRETURN SQL_API | SQLNumParams (SQLHSTMT stmt, SQLSMALLINT *nparam) |
Return number of parameters. | |
SQLRETURN SQL_API | SQLParamData (SQLHSTMT stmt, SQLPOINTER *p) |
Retrieve next parameter for sending data to executing query. | |
SQLRETURN SQL_API | SQLDescribeParam (SQLHSTMT stmt, UWORD pnum, SWORD *dtype, UDWORD *size, SWORD *decdigits, SWORD *nullable) |
Return information about parameter. | |
SQLRETURN SQL_API | SQLSetParam (SQLHSTMT stmt, SQLUSMALLINT par, SQLSMALLINT type, SQLSMALLINT sqltype, SQLUINTEGER coldef, SQLSMALLINT scale, SQLPOINTER val, SQLINTEGER *nval) |
Set information on parameter. | |
SQLRETURN SQL_API | SQLParamOptions (SQLHSTMT stmt, UDWORD rows, UDWORD *rowp) |
Function not implemented. | |
SQLRETURN SQL_API | SQLGetDescField (SQLHDESC handle, SQLSMALLINT recno, SQLSMALLINT fieldid, SQLPOINTER value, SQLINTEGER buflen, SQLINTEGER *strlen) |
Function not implemented. | |
SQLRETURN SQL_API | SQLSetDescField (SQLHDESC handle, SQLSMALLINT recno, SQLSMALLINT fieldid, SQLPOINTER value, SQLINTEGER buflen) |
Function not implemented. | |
SQLRETURN SQL_API | SQLGetDescRec (SQLHDESC handle, SQLSMALLINT recno, SQLCHAR *name, SQLSMALLINT buflen, SQLSMALLINT *strlen, SQLSMALLINT *type, SQLSMALLINT *subtype, SQLINTEGER *len, SQLSMALLINT *prec, SQLSMALLINT *scale, SQLSMALLINT *nullable) |
Function not implemented. | |
SQLRETURN SQL_API | SQLSetDescRec (SQLHDESC handle, SQLSMALLINT recno, SQLSMALLINT type, SQLSMALLINT subtype, SQLINTEGER len, SQLSMALLINT prec, SQLSMALLINT scale, SQLPOINTER data, SQLINTEGER *strlen, SQLINTEGER *indicator) |
Function not implemented. | |
SQLRETURN | mkresultset (HSTMT stmt, COL *colspec, int ncols) |
Setup empty result set from constant column specification. | |
SQLRETURN SQL_API | SQLTablePrivileges (SQLHSTMT stmt, SQLCHAR *catalog, SQLSMALLINT catalogLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen) |
Retrieve privileges on tables and/or views. | |
SQLRETURN SQL_API | SQLColumnPrivileges (SQLHSTMT stmt, SQLCHAR *catalog, SQLSMALLINT catalogLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLCHAR *column, SQLSMALLINT columnLen) |
Retrieve privileges on columns. | |
SQLRETURN | drvprimarykeys (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen) |
Internal retrieve information about indexed columns. | |
SQLRETURN SQL_API | SQLPrimaryKeys (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen) |
Retrieve information about indexed columns. | |
SQLRETURN | drvspecialcolumns (SQLHSTMT stmt, SQLUSMALLINT id, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLUSMALLINT scope, SQLUSMALLINT nullable) |
Internal retrieve information about indexed columns. | |
SQLRETURN SQL_API | SQLSpecialColumns (SQLHSTMT stmt, SQLUSMALLINT id, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLUSMALLINT scope, SQLUSMALLINT nullable) |
Retrieve information about indexed columns. | |
SQLRETURN SQL_API | drvforeignkeys (SQLHSTMT stmt, SQLCHAR *PKcatalog, SQLSMALLINT PKcatalogLen, SQLCHAR *PKschema, SQLSMALLINT PKschemaLen, SQLCHAR *PKtable, SQLSMALLINT PKtableLen, SQLCHAR *FKcatalog, SQLSMALLINT FKcatalogLen, SQLCHAR *FKschema, SQLSMALLINT FKschemaLen, SQLCHAR *FKtable, SQLSMALLINT FKtableLen) |
Internal retrieve information about primary/foreign keys. | |
SQLRETURN SQL_API | SQLForeignKeys (SQLHSTMT stmt, SQLCHAR *PKcatalog, SQLSMALLINT PKcatalogLen, SQLCHAR *PKschema, SQLSMALLINT PKschemaLen, SQLCHAR *PKtable, SQLSMALLINT PKtableLen, SQLCHAR *FKcatalog, SQLSMALLINT FKcatalogLen, SQLCHAR *FKschema, SQLSMALLINT FKschemaLen, SQLCHAR *FKtable, SQLSMALLINT FKtableLen) |
Retrieve information about primary/foreign keys. | |
SQLRETURN | endtran (DBC *d, SQLSMALLINT comptype) |
Internal commit or rollback transaction. | |
SQLRETURN | drvendtran (SQLSMALLINT type, SQLHANDLE handle, SQLSMALLINT comptype) |
Internal commit or rollback transaction. | |
SQLRETURN SQL_API | SQLEndTran (SQLSMALLINT type, SQLHANDLE handle, SQLSMALLINT comptype) |
Commit or rollback transaction. | |
SQLRETURN SQL_API | SQLTransact (SQLHENV env, SQLHDBC dbc, UWORD type) |
Commit or rollback transaction. | |
SQLRETURN SQL_API | SQLCopyDesc (SQLHDESC source, SQLHDESC target) |
Function not implemented. | |
SQLRETURN SQL_API | SQLNativeSql (SQLHSTMT stmt, SQLCHAR *sqlin, SQLINTEGER sqlinLen, SQLCHAR *sql, SQLINTEGER sqlMax, SQLINTEGER *sqlLen) |
Translate SQL string. | |
SQLRETURN SQL_API | SQLProcedures (SQLHSTMT stmt, SQLCHAR *catalog, SQLSMALLINT catalogLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *proc, SQLSMALLINT procLen) |
Retrieve information about stored procedures. | |
SQLRETURN SQL_API | SQLProcedureColumns (SQLHSTMT stmt, SQLCHAR *catalog, SQLSMALLINT catalogLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *proc, SQLSMALLINT procLen, SQLCHAR *column, SQLSMALLINT columnLen) |
Retrieve information about columns in result set of stored procedures. | |
SQLRETURN SQL_API | SQLGetEnvAttr (SQLHENV env, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER len, SQLINTEGER *lenp) |
Get information of HENV. | |
SQLRETURN SQL_API | SQLSetEnvAttr (SQLHENV env, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER len) |
Set information in HENV. | |
SQLRETURN | drvgetdiagrec (SQLSMALLINT htype, SQLHANDLE handle, SQLSMALLINT recno, SQLCHAR *sqlstate, SQLINTEGER *nativeerr, SQLCHAR *msg, SQLSMALLINT buflen, SQLSMALLINT *msglen) |
Internal get error message given handle (HENV, HDBC, or HSTMT). | |
SQLRETURN SQL_API | SQLGetDiagRec (SQLSMALLINT htype, SQLHANDLE handle, SQLSMALLINT recno, SQLCHAR *sqlstate, SQLINTEGER *nativeerr, SQLCHAR *msg, SQLSMALLINT buflen, SQLSMALLINT *msglen) |
Get error message given handle (HENV, HDBC, or HSTMT). | |
SQLRETURN SQL_API | SQLGetDiagField (SQLSMALLINT htype, SQLHANDLE handle, SQLSMALLINT recno, SQLSMALLINT id, SQLPOINTER info, SQLSMALLINT buflen, SQLSMALLINT *strlen) |
Function not implemented. | |
SQLRETURN | drvgetstmtattr (SQLHSTMT stmt, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER bufmax, SQLINTEGER *buflen) |
Internal get option of HSTMT. | |
SQLRETURN SQL_API | SQLGetStmtAttr (SQLHSTMT stmt, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER bufmax, SQLINTEGER *buflen) |
Get option of HSTMT. | |
SQLRETURN | drvsetstmtattr (SQLHSTMT stmt, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER buflen) |
Internal set option on HSTMT. | |
SQLRETURN SQL_API | SQLSetStmtAttr (SQLHSTMT stmt, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER buflen) |
Set option on HSTMT. | |
SQLRETURN | drvgetstmtoption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLPOINTER param) |
Internal get option of HSTMT. | |
SQLRETURN SQL_API | SQLGetStmtOption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLPOINTER param) |
Get option of HSTMT. | |
SQLRETURN | drvsetstmtoption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLUINTEGER param) |
Internal set option on HSTMT. | |
SQLRETURN SQL_API | SQLSetStmtOption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLUINTEGER param) |
Set option on HSTMT. | |
SQLRETURN SQL_API | SQLSetPos (SQLHSTMT stmt, SQLUSMALLINT row, SQLUSMALLINT op, SQLUSMALLINT lock) |
Function not implemented. | |
SQLRETURN SQL_API | SQLSetScrollOptions (SQLHSTMT stmt, SQLUSMALLINT concur, SQLINTEGER rowkeyset, SQLUSMALLINT rowset) |
Function not implemented. | |
SQLRETURN | drvgetinfo (SQLHDBC dbc, SQLUSMALLINT type, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen) |
Internal return information about what this ODBC driver supports. | |
SQLRETURN SQL_API | SQLGetInfo (SQLHDBC dbc, SQLUSMALLINT type, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen) |
Return information about what this ODBC driver supports. | |
SQLRETURN SQL_API | SQLGetFunctions (SQLHDBC dbc, SQLUSMALLINT func, SQLUSMALLINT *flags) |
Return information about supported ODBC API functions. | |
SQLRETURN | drvallocenv (SQLHENV *env) |
Internal allocate HENV. | |
SQLRETURN SQL_API | SQLAllocEnv (SQLHENV *env) |
Allocate HENV. | |
SQLRETURN | drvfreeenv (SQLHENV env) |
Internal free HENV. | |
SQLRETURN SQL_API | SQLFreeEnv (SQLHENV env) |
Free HENV. | |
SQLRETURN | drvallocconnect (SQLHENV env, SQLHDBC *dbc) |
Internal allocate HDBC. | |
SQLRETURN SQL_API | SQLAllocConnect (SQLHENV env, SQLHDBC *dbc) |
Allocate HDBC. | |
SQLRETURN | drvfreeconnect (SQLHDBC dbc) |
Internal free connection (HDBC). | |
SQLRETURN SQL_API | SQLFreeConnect (SQLHDBC dbc) |
Free connection (HDBC). | |
SQLRETURN | drvgetconnectattr (SQLHDBC dbc, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER bufmax, SQLINTEGER *buflen) |
Internal get connect attribute of HDBC. | |
SQLRETURN SQL_API | SQLGetConnectAttr (SQLHDBC dbc, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER bufmax, SQLINTEGER *buflen) |
Get connect attribute of HDBC. | |
SQLRETURN | drvsetconnectattr (SQLHDBC dbc, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER len) |
Internal set connect attribute of HDBC. | |
SQLRETURN SQL_API | SQLSetConnectAttr (SQLHDBC dbc, SQLINTEGER attr, SQLPOINTER val, SQLINTEGER len) |
Set connect attribute of HDBC. | |
SQLRETURN | drvgetconnectoption (SQLHDBC dbc, SQLUSMALLINT opt, SQLPOINTER param) |
Internal get connect option of HDBC. | |
SQLRETURN SQL_API | SQLGetConnectOption (SQLHDBC dbc, SQLUSMALLINT opt, SQLPOINTER param) |
Get connect option of HDBC. | |
SQLRETURN | drvsetconnectoption (SQLHDBC dbc, SQLUSMALLINT opt, SQLUINTEGER param) |
Internal set option on HDBC. | |
SQLRETURN SQL_API | SQLSetConnectOption (SQLHDBC dbc, SQLUSMALLINT opt, SQLUINTEGER param) |
Set option on HDBC. | |
int | getdsnattr (char *dsn, char *attr, char *out, int outLen) |
Handling of SQLConnect() connection attributes for standalone operation without driver manager. | |
SQLRETURN | drvconnect (SQLHDBC dbc, SQLCHAR *dsn, SQLSMALLINT dsnLen) |
Internal connect to SQLite database. | |
SQLRETURN SQL_API | SQLConnect (SQLHDBC dbc, SQLCHAR *dsn, SQLSMALLINT dsnLen, SQLCHAR *uid, SQLSMALLINT uidLen, SQLCHAR *pass, SQLSMALLINT passLen) |
Connect to SQLite database. | |
SQLRETURN SQL_API | SQLDisconnect (SQLHDBC dbc) |
Disconnect given HDBC. | |
SQLRETURN | drvdriverconnect (SQLHDBC dbc, SQLHWND hwnd, SQLCHAR *connIn, SQLSMALLINT connInLen, SQLCHAR *connOut, SQLSMALLINT connOutMax, SQLSMALLINT *connOutLen, SQLUSMALLINT drvcompl) |
Internal standalone (w/o driver manager) database connect. | |
SQLRETURN | freestmt (SQLHSTMT stmt) |
SQLRETURN | drvallocstmt (SQLHDBC dbc, SQLHSTMT *stmt) |
Allocate HSTMT given HDBC (driver internal version). | |
SQLRETURN SQL_API | SQLAllocStmt (SQLHDBC dbc, SQLHSTMT *stmt) |
Allocate HSTMT given HDBC. | |
SQLRETURN | drvfreestmt (SQLHSTMT stmt, SQLUSMALLINT opt) |
Internal function to perform certain kinds of free/close on STMT. | |
SQLRETURN SQL_API | SQLFreeStmt (SQLHSTMT stmt, SQLUSMALLINT opt) |
Free HSTMT. | |
SQLRETURN SQL_API | SQLCancel (SQLHSTMT stmt) |
Cancel HSTMT closing cursor. | |
SQLRETURN | drvgetcursorname (SQLHSTMT stmt, SQLCHAR *cursor, SQLSMALLINT buflen, SQLSMALLINT *lenp) |
Internal function to get cursor name of STMT. | |
SQLRETURN SQL_API | SQLGetCursorName (SQLHSTMT stmt, SQLCHAR *cursor, SQLSMALLINT buflen, SQLSMALLINT *lenp) |
Get cursor name of STMT. | |
SQLRETURN | drvsetcursorname (SQLHSTMT stmt, SQLCHAR *cursor, SQLSMALLINT len) |
Internal function to set cursor name on STMT. | |
SQLRETURN SQL_API | SQLSetCursorName (SQLHSTMT stmt, SQLCHAR *cursor, SQLSMALLINT len) |
Set cursor name on STMT. | |
SQLRETURN SQL_API | SQLCloseCursor (SQLHSTMT stmt) |
Close open cursor. | |
SQLRETURN SQL_API | SQLAllocHandle (SQLSMALLINT type, SQLHANDLE input, SQLHANDLE *output) |
Allocate a HENV, HDBC, or HSTMT handle. | |
SQLRETURN SQL_API | SQLFreeHandle (SQLSMALLINT type, SQLHANDLE h) |
Free a HENV, HDBC, or HSTMT handle. | |
SQLRETURN | getrowdata (STMT *s, SQLUSMALLINT col, SQLSMALLINT otype, SQLPOINTER val, SQLINTEGER len, SQLINTEGER *lenp, int partial) |
Internal function to retrieve row data, used by SQLFetch() and friends and SQLGetData(). | |
SQLRETURN SQL_API | SQLBindCol (SQLHSTMT stmt, SQLUSMALLINT col, SQLSMALLINT type, SQLPOINTER val, SQLINTEGER max, SQLINTEGER *lenp) |
Bind C variable to column of result set. | |
SQLRETURN | drvtables (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLCHAR *type, SQLSMALLINT typeLen) |
Retrieve information on tables and/or views. | |
SQLRETURN SQL_API | SQLTables (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLCHAR *type, SQLSMALLINT typeLen) |
Retrieve information on tables and/or views. | |
SQLRETURN | drvcolumns (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLCHAR *col, SQLSMALLINT colLen) |
Internal retrieve column information on table. | |
SQLRETURN SQL_API | SQLColumns (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLCHAR *col, SQLSMALLINT colLen) |
Retrieve column information on table. | |
void | mktypeinfo (STMT *s, int row, char *typename, int type, int tind) |
Internal function to build up data type information as row in result set. | |
int | typeinfosort (const void *a, const void *b) |
Helper function to sort type information. | |
SQLRETURN | drvgettypeinfo (SQLHSTMT stmt, SQLSMALLINT sqltype) |
Internal return data type information. | |
SQLRETURN SQL_API | SQLGetTypeInfo (SQLHSTMT stmt, SQLSMALLINT sqltype) |
Return data type information. | |
SQLRETURN | drvstatistics (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLUSMALLINT itype, SQLUSMALLINT resv) |
Internal return statistic information on table indices. | |
SQLRETURN SQL_API | SQLStatistics (SQLHSTMT stmt, SQLCHAR *cat, SQLSMALLINT catLen, SQLCHAR *schema, SQLSMALLINT schemaLen, SQLCHAR *table, SQLSMALLINT tableLen, SQLUSMALLINT itype, SQLUSMALLINT resv) |
Return statistic information on table indices. | |
SQLRETURN SQL_API | SQLGetData (SQLHSTMT stmt, SQLUSMALLINT col, SQLSMALLINT type, SQLPOINTER val, SQLINTEGER len, SQLINTEGER *lenp) |
Retrieve row data after fetch. | |
SQLRETURN | dofetchbind (STMT *s, int rsi) |
Internal: fetch and bind from statement's current row. | |
SQLRETURN | drvfetchscroll (SQLHSTMT stmt, SQLSMALLINT orient, SQLINTEGER offset) |
Internal fetch function for SQLFetchScroll() and SQLExtendedFetch(). | |
SQLRETURN SQL_API | SQLFetch (SQLHSTMT stmt) |
Fetch next result row. | |
SQLRETURN SQL_API | SQLFetchScroll (SQLHSTMT stmt, SQLSMALLINT orient, SQLINTEGER offset) |
Fetch result row with scrolling. | |
SQLRETURN SQL_API | SQLExtendedFetch (SQLHSTMT stmt, SQLUSMALLINT orient, SQLINTEGER offset, SQLUINTEGER *rowcount, SQLUSMALLINT *rowstatus) |
Fetch result row with scrolling and row status. | |
SQLRETURN SQL_API | SQLRowCount (SQLHSTMT stmt, SQLINTEGER *nrows) |
Return number of affected rows of HSTMT. | |
SQLRETURN SQL_API | SQLNumResultCols (SQLHSTMT stmt, SQLSMALLINT *ncols) |
Return number of columns of result set given HSTMT. | |
SQLRETURN | drvdescribecol (SQLHSTMT stmt, SQLUSMALLINT col, SQLCHAR *name, SQLSMALLINT nameMax, SQLSMALLINT *nameLen, SQLSMALLINT *type, SQLUINTEGER *size, SQLSMALLINT *digits, SQLSMALLINT *nullable) |
Internal describe column information. | |
SQLRETURN SQL_API | SQLDescribeCol (SQLHSTMT stmt, SQLUSMALLINT col, SQLCHAR *name, SQLSMALLINT nameMax, SQLSMALLINT *nameLen, SQLSMALLINT *type, SQLUINTEGER *size, SQLSMALLINT *digits, SQLSMALLINT *nullable) |
Describe column information. | |
SQLRETURN | drvcolattributes (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLINTEGER *val2) |
Internal retrieve column attributes. | |
SQLRETURN SQL_API | SQLColAttributes (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLINTEGER *val2) |
Retrieve column attributes. | |
SQLRETURN | drvcolattribute (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLPOINTER val2) |
Internal retrieve column attributes. | |
SQLRETURN SQL_API | SQLColAttribute (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLPOINTER val2) |
Retrieve column attributes. | |
SQLRETURN | drverror (SQLHENV env, SQLHDBC dbc, SQLHSTMT stmt, SQLCHAR *sqlState, SQLINTEGER *nativeErr, SQLCHAR *errmsg, SQLSMALLINT errmax, SQLSMALLINT *errlen) |
Internal return last HDBC or HSTMT error message. | |
SQLRETURN SQL_API | SQLError (SQLHENV env, SQLHDBC dbc, SQLHSTMT stmt, SQLCHAR *sqlState, SQLINTEGER *nativeErr, SQLCHAR *errmsg, SQLSMALLINT errmax, SQLSMALLINT *errlen) |
Return last HDBC or HSTMT error message. | |
SQLRETURN SQL_API | SQLMoreResults (SQLHSTMT stmt) |
Return information for more result sets. | |
int | selcb (void *arg, int ncols, char **values, char **cols) |
SQLite callback during drvprepare(), used to collect column information. | |
SQLRETURN | drvprepare (SQLHSTMT stmt, SQLCHAR *query, SQLINTEGER queryLen) |
Internal query preparation used by SQLPrepare() and SQLExecDirect(). | |
SQLRETURN SQL_API | SQLPrepare (SQLHSTMT stmt, SQLCHAR *query, SQLINTEGER queryLen) |
Prepare HSTMT. | |
SQLRETURN SQL_API | SQLExecute (SQLHSTMT stmt) |
Execute query. | |
SQLRETURN SQL_API | SQLExecDirect (SQLHSTMT stmt, SQLCHAR *query, SQLINTEGER queryLen) |
Execute query directly. | |
SQLRETURN SQL_API | SQLDriverConnect (SQLHDBC dbc, SQLHWND hwnd, SQLCHAR *connIn, SQLSMALLINT connInLen, SQLCHAR *connOut, SQLSMALLINT connOutMax, SQLSMALLINT *connOutLen, SQLUSMALLINT drvcompl) |
Connect using a driver connection string. | |
Variables | |
const char | upper_chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
const char | lower_chars [] = "abcdefghijklmnopqrstuvwxyz" |
const char | digit_chars [] = "0123456789" |
const char | space_chars [] = " \f\n\r\t\v" |
const char | id_chars [] |
COL | tablePrivSpec [] |
Columns for result set of SQLTablePrivileges(). | |
COL | colPrivSpec [] |
Columns for result set of SQLColumnPrivileges(). | |
COL | pkeySpec [] |
Columns for result set of SQLPrimaryKeys(). | |
COL | scolSpec [] |
Columns for result set of SQLSpecialColumns(). | |
COL | fkeySpec [] |
Columns for result set of SQLForeignKeys(). | |
COL | procSpec [] |
Columns for result set of SQLProcedures(). | |
COL | procColSpec [] |
Columns for result set of SQLProcedureColumns(). | |
COL | tableSpec [] |
Columns for result set of SQLTables(). | |
COL | colSpec [] |
Columns for result set of SQLColumns(). | |
COL | typeSpec [] |
Columns for result set of SQLGetTypeInfo(). | |
COL | statSpec [] |
Columns for result set of SQLStatistics(). |
|
Definition at line 37 of file sqliteodbc.c. Referenced by drvcolumns(), drvforeignkeys(), drvgettypeinfo(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), drvtables(), fixupdyncols(), mktypeinfo(), SQLColumnPrivileges(), SQLGetFunctions(), SQLProcedureColumns(), SQLProcedures(), and SQLTablePrivileges(). |
|
|
|
Definition at line 55 of file sqliteodbc.c. Referenced by drvallocstmt(), and drverror(). |
|
Definition at line 2172 of file sqliteodbc.c. Referenced by drvexecute(), drvprepare(), endtran(), and vm_start(). |
|
Definition at line 56 of file sqliteodbc.c. |
|
Definition at line 29 of file sqliteodbc.c. Referenced by drvgetinfo(). |
|
Definition at line 632 of file sqliteodbc.c. Referenced by drvallocconnect(). |
|
Definition at line 633 of file sqliteodbc.c. Referenced by drvfreeconnect(). |
|
Definition at line 54 of file sqliteodbc.c. |
|
Definition at line 219 of file sqliteodbc.c. Referenced by str2date(), str2time(), and str2timestamp(). |
|
Definition at line 239 of file sqliteodbc.c. Referenced by fixupsql(). |
|
Definition at line 228 of file sqliteodbc.c. Referenced by fixupsql(). |
|
Definition at line 35 of file sqliteodbc.c. Referenced by drvbindparam(), getrowdata(), and SQLBindCol(). |
|
Definition at line 33 of file sqliteodbc.c. Referenced by drvallocconnect(), drvcolumns(), drvconnect(), drvdriverconnect(), drverror(), drvforeignkeys(), drvgetcursorname(), drvprimarykeys(), drvsetcursorname(), drvspecialcolumns(), drvstatistics(), drvtables(), getdsnattr(), getrowdata(), SQLNativeSql(), and SQLPutData(). |
|
Definition at line 25 of file sqliteodbc.c. Referenced by drvconnect(), and drvdriverconnect(). |
|
Definition at line 51 of file sqliteodbc.c. |
|
Definition at line 50 of file sqliteodbc.c. |
|
Referenced by SQLGetFunctions(). |
|
Definition at line 40 of file sqliteodbc.c. Referenced by drvcolumns(), drvforeignkeys(), drvspecialcolumns(), drvstatistics(), and mktypeinfo(). |
|
Definition at line 39 of file sqliteodbc.c. |
|
Value: { \ int len = strlen(src); \ int cnt = min(len + 1, max); \ strncpy(dst, src, cnt); \ *lenp = (cnt > len) ? len : cnt; \ } Definition at line 6070 of file sqliteodbc.c. Referenced by drvgetinfo(). |
|
Definition at line 42 of file sqliteodbc.c. Referenced by drvallocconnect(). |
|
Definition at line 182 of file sqliteodbc.c. Referenced by drvallocconnect(), drvfreeconnect(), drvfreeenv(), freep(), freestmt(), and mapsqltype(). |
|
Definition at line 180 of file sqliteodbc.c. Referenced by drvallocconnect(), drvallocenv(), drvallocstmt(), drvbindparam(), drvcolumns(), drvexecute(), drvforeignkeys(), drvgettypeinfo(), drvprepare(), drvprimarykeys(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), drvstatistics(), drvtables(), fixupdyncols(), fixupsql(), getrowdata(), mapsqltype(), mkbindcols(), selcb(), SQLPutData(), strdup_(), substparam(), and vm_step(). |
|
Definition at line 181 of file sqliteodbc.c. Referenced by drvbindparam(), and mkbindcols(). |
|
Definition at line 183 of file sqliteodbc.c. Referenced by dbopen(), drvcolumns(), drvforeignkeys(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), fixupdyncols(), and vm_step(). |
|
Busy callback for SQLite.
Definition at line 881 of file sqliteodbc.c. References DBC, dbc::t0, and dbc::timeout. Referenced by setsqliteopts(). |
|
Open SQLite database file given file name and flags.
Definition at line 2187 of file sqliteodbc.c. References dbc::curtype, DBC, dbc::dbname, dbc::dsn, freep(), getbool(), dbc::ov3, setsqliteopts(), setstatd(), dbc::sqlite, dbc::step_enable, dbc::timeout, and xstrdup. Referenced by drvconnect(), and drvdriverconnect(). |
|
Internal: fetch and bind from statement's current row.
Definition at line 10134 of file sqliteodbc.c. References stmt::bind_offs, stmt::bind_type, stmt::bindcols, stmt::bkmrk, stmt::bkmrkcol, getrowdata(), BINDCOL::lenp, BINDCOL::max, stmt::ncols, BINDCOL::offs, stmt::row_status0, stmt::rowp, STMT, BINDCOL::type, and BINDCOL::valp. Referenced by drvfetchscroll(). |
|
Internal allocate HDBC.
Definition at line 6873 of file sqliteodbc.c. References dbc::autocommit, dbc::curtype, DBC, ENV::dbcs, drvgetgpps, dbc::env, dbc::magic, ENV::magic, min, dbc::next, ENV::ov3, dbc::ov3, dbc::ov3val, verinfo, dbc::version, xfree, and xmalloc. Referenced by SQLAllocConnect(), and SQLAllocHandle(). |
|
Internal allocate HENV.
Definition at line 6796 of file sqliteodbc.c. References ENV::dbcs, ENV::magic, ENV::ov3, and xmalloc. Referenced by SQLAllocEnv(), and SQLAllocHandle(). |
|
Allocate HSTMT given HDBC (driver internal version).
Definition at line 7847 of file sqliteodbc.c. References stmt::bind_offs, stmt::bind_type, stmt::cursorname, dbc::curtype, stmt::curtype, stmt::dbc, DBC, DBC_MAGIC, dbc::magic, stmt::next, dbc::nowchar, stmt::nowchar, dbc::ov3, stmt::ov3, stmt::paramset_size, stmt::retr_data, stmt::row_status0, stmt::row_status1, stmt::rowset_size, dbc::stmt, STMT, and xmalloc. Referenced by SQLAllocHandle(), and SQLAllocStmt(). |
|
Internal bind parameter on HSTMT.
Definition at line 3207 of file sqliteodbc.c. References stmt::bindparms, BINDPARM::inc, BINDPARM::ind, BINDPARM::len, BINDPARM::lenp, BINDPARM::max, max, stmt::nbindparms, BINDPARM::need, nomem(), BINDPARM::offs, stmt::ov3, BINDPARM::param, BINDPARM::param0, setstat(), STMT, BINDPARM::stype, BINDPARM::type, xmalloc, and xrealloc. Referenced by SQLBindParam(), SQLBindParameter(), and SQLSetParam(). |
|
Internal retrieve column attributes.
Definition at line 10999 of file sqliteodbc.c. References COL::autoinc, stmt::cols, COL::column, COL::db, COL::label, stmt::ncols, COL::nosign, stmt::nowchar, stmt::ov3, COL::prec, COL::scale, setstat(), COL::size, STMT, COL::table, COL::type, and COL::typename. Referenced by SQLColAttribute(). |
|
Internal retrieve column attributes.
Definition at line 10689 of file sqliteodbc.c. References COL::autoinc, stmt::cols, COL::column, COL::label, stmt::ncols, COL::nosign, stmt::nowchar, stmt::ov3, COL::prec, COL::scale, setstat(), COL::size, STMT, COL::table, COL::type, and COL::typename. Referenced by SQLColAttributes(). |
|
Internal retrieve column information on table.
Definition at line 9158 of file sqliteodbc.c. References array_size, colSpec, stmt::dbc, DBC, getmd(), mapsqltype(), min, mkresultset(), nomem(), stmt::nowchar, stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, STMT, stringify, xmalloc, and xstrdup. Referenced by SQLColumns(). |
|
Internal connect to SQLite database.
Definition at line 7484 of file sqliteodbc.c. References DBC, dbopen(), getbool(), getdsnattr(), dbc::magic, min, dbc::nowchar, ODBC_INI, dbc::ov3, setstatd(), and dbc::sqlite. Referenced by SQLConnect(). |
|
Internal describe column information.
Definition at line 10520 of file sqliteodbc.c. References stmt::cols, COL::column, stmt::ncols, stmt::nowchar, stmt::ov3, setstat(), COL::size, STMT, and COL::type. Referenced by SQLDescribeCol(). |
|
Internal standalone (w/o driver manager) database connect.
Definition at line 7667 of file sqliteodbc.c. References DBC, dbopen(), getdsnattr(), min, ODBC_INI, dbc::ov3, setstatd(), and dbc::sqlite. Referenced by SQLDriverConnect(). |
|
Internal commit or rollback transaction.
Definition at line 4957 of file sqliteodbc.c. References DBC, endtran(), and dbc::next. Referenced by SQLEndTran(), and SQLTransact(). |
|
Internal return last HDBC or HSTMT error message.
Definition at line 11294 of file sqliteodbc.c. References DBC, DBC_MAGIC, dbc::logmsg, stmt::logmsg, dbc::magic, min, dbc::naterr, stmt::naterr, dbc::sqlstate, stmt::sqlstate, and STMT. Referenced by SQLError(). |
|
|
Internal fetch function for SQLFetchScroll() and SQLExtendedFetch().
Definition at line 10222 of file sqliteodbc.c. References stmt::bindcols, stmt::bkmrk, stmt::curtype, stmt::dbc, DBC, dofetchbind(), stmt::nrows, stmt::row_count, stmt::row_count0, stmt::row_status, stmt::row_status0, stmt::rowp, stmt::rows, stmt::rowset_size, setstat(), STMT, stmt::vm, and vm_step(). Referenced by SQLExtendedFetch(), SQLFetch(), and SQLFetchScroll(). |
|
Internal retrieve information about primary/foreign keys.
Definition at line 4489 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, findcol(), fkeySpec, min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, STMT, stringify, xmalloc, and xstrdup. Referenced by SQLForeignKeys(). |
|
Internal free connection (HDBC).
Definition at line 6947 of file sqliteodbc.c. References DBC, ENV::dbcs, drvrelgpps, dbc::env, freestmt(), ENV::magic, dbc::magic, dbc::next, dbc::ov3, setstatd(), dbc::sqlite, dbc::stmt, and xfree. Referenced by SQLFreeConnect(), and SQLFreeHandle(). |
|
Internal free HENV.
Definition at line 6834 of file sqliteodbc.c. References ENV::dbcs, ENV::magic, and xfree. Referenced by SQLFreeEnv(), and SQLFreeHandle(). |
|
Internal function to perform certain kinds of free/close on STMT.
Definition at line 7912 of file sqliteodbc.c. References freeparams(), freeresult(), freestmt(), stmt::ov3, setstat(), STMT, unbindcols(), and vm_end_if(). Referenced by SQLCancel(), SQLCloseCursor(), SQLFreeHandle(), and SQLFreeStmt(). |
|
Internal get connect attribute of HDBC.
Definition at line 7021 of file sqliteodbc.c. References dbc::autocommit, dbc::curtype, DBC, dbc::ov3, setstatd(), and dbc::sqlite. Referenced by SQLGetConnectAttr(). |
|
Internal get connect option of HDBC.
Definition at line 7250 of file sqliteodbc.c. References dbc::autocommit, dbc::curtype, DBC, dbc::ov3, and setstatd(). Referenced by SQLGetConnectOption(). |
|
Internal function to get cursor name of STMT.
Definition at line 7976 of file sqliteodbc.c. References stmt::cursorname, min, and STMT. Referenced by SQLGetCursorName(). |
|
Internal get error message given handle (HENV, HDBC, or HSTMT).
Definition at line 5363 of file sqliteodbc.c. References DBC, stmt::logmsg, dbc::logmsg, stmt::naterr, dbc::naterr, stmt::sqlstate, dbc::sqlstate, and STMT. Referenced by SQLGetDiagRec(). |
|
Internal return information about what this ODBC driver supports.
Definition at line 6088 of file sqliteodbc.c. References DBC, dbc::dbname, DRIVER_VER_INFO, dbc::dsn, dbc::ov3, setstatd(), and strmak. Referenced by SQLGetInfo(). |
|
Internal get option of HSTMT.
Definition at line 5579 of file sqliteodbc.c. References stmt::bind_offs, stmt::bind_type, stmt::bkmrk, stmt::curtype, stmt::dbc, DBC, drvunimplstmt(), stmt::paramset_size, stmt::parm_bind_offs, stmt::parm_oper, stmt::parm_proc, stmt::parm_status, stmt::retr_data, stmt::row_count, stmt::row_status, stmt::rowp, stmt::rowset_size, STMT, dbc::vm_rownum, and dbc::vm_stmt. Referenced by SQLGetStmtAttr(). |
|
Internal get option of HSTMT.
Definition at line 5879 of file sqliteodbc.c. References stmt::curtype, stmt::dbc, DBC, drvunimplstmt(), stmt::retr_data, stmt::rowp, stmt::rowset_size, STMT, dbc::vm_rownum, and dbc::vm_stmt. Referenced by SQLGetStmtOption(). |
|
Internal return data type information.
Definition at line 9550 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, mkresultset(), mktypeinfo(), nomem(), stmt::nowchar, stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, STMT, typeinfosort(), typeSpec, and xmalloc. Referenced by SQLGetTypeInfo(). |
|
Internal query preparation used by SQLPrepare() and SQLExecDirect().
Definition at line 11578 of file sqliteodbc.c. References stmt::dbc, DBC, dbtracerc, fixupsql(), freep(), freeresult(), stmt::isselect, mkbindcols(), stmt::ncols, noconn(), nomem(), stmt::nparams, stmt::ov3, stmt::paramset_count, stmt::parmnames, stmt::query, selcb(), setstat(), dbc::sqlite, STMT, dbc::version, vm_end(), and xmalloc. Referenced by SQLExecDirect(), and SQLPrepare(). |
|
Internal retrieve information about indexed columns.
Definition at line 3847 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, findcol(), min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::ov3, pkeySpec, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, STMT, xmalloc, and xstrdup. Referenced by SQLPrimaryKeys(). |
|
Internal set connect attribute of HDBC.
Definition at line 7173 of file sqliteodbc.c. References dbc::autocommit, DBC, endtran(), dbc::intrans, setstatd(), vm_end(), and dbc::vm_stmt. Referenced by SQLSetConnectAttr(). |
|
Internal set option on HDBC.
Definition at line 7369 of file sqliteodbc.c. References dbc::autocommit, DBC, endtran(), dbc::intrans, setstatd(), vm_end(), and dbc::vm_stmt. Referenced by SQLSetConnectOption(). |
|
Internal function to set cursor name on STMT.
Definition at line 8069 of file sqliteodbc.c. References stmt::cursorname, min, stmt::ov3, setstat(), and STMT. Referenced by SQLSetCursorName(). |
|
Internal set option on HSTMT.
Definition at line 5721 of file sqliteodbc.c. References stmt::bind_offs, stmt::bind_type, stmt::bkmrk, stmt::curtype, drvunimplstmt(), freep(), nomem(), stmt::paramset_count, stmt::paramset_size, stmt::parm_bind_offs, stmt::parm_oper, stmt::parm_proc, stmt::parm_status, stmt::retr_data, stmt::row_count, stmt::row_status, stmt::row_status0, stmt::row_status1, stmt::rowset_size, setstat(), STMT, and xmalloc. Referenced by SQLSetStmtAttr(). |
|
Internal set option on HSTMT.
Definition at line 5958 of file sqliteodbc.c. References stmt::curtype, drvunimplstmt(), freep(), nomem(), stmt::retr_data, stmt::row_status0, stmt::row_status1, stmt::rowset_size, setstat(), STMT, and xmalloc. Referenced by SQLSetStmtOption(). |
|
Internal retrieve information about indexed columns.
Definition at line 4132 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, findcol(), freep(), getmd(), mapsqltype(), min, mkresultset(), stmt::ncols, nomem(), stmt::nowchar, stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, scolSpec, setstat(), dbc::sqlite, STMT, stringify, xmalloc, and xstrdup. Referenced by SQLSpecialColumns(). |
|
Internal return statistic information on table indices.
Definition at line 9810 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, findcol(), min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, statSpec, STMT, stringify, xmalloc, and xstrdup. Referenced by SQLStatistics(). |
|
Retrieve information on tables and/or views.
Definition at line 8848 of file sqliteodbc.c. References array_size, stmt::dbc, DBC, dbc::dbname, freeresult(), min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::rowfree, stmt::rowp, stmt::rows, dbc::sqlite, STMT, tableSpec, TOLOWER(), and xmalloc. Referenced by SQLTables(). |
|
Report IM001 (not implemented) SQL error code for HDBC.
Definition at line 723 of file sqliteodbc.c. References DBC, and setstatd(). Referenced by SQLBrowseConnect(). |
|
Report IM001 (not implemented) SQL error code for HSTMT.
Definition at line 742 of file sqliteodbc.c. References setstat(), and STMT. Referenced by drvgetstmtattr(), drvgetstmtoption(), drvsetstmtattr(), drvsetstmtoption(), SQLBulkOperations(), SQLParamOptions(), SQLSetPos(), and SQLSetScrollOptions(). |
|
Internal commit or rollback transaction.
Definition at line 4898 of file sqliteodbc.c. References dbc::autocommit, DBC, dbtracerc, dbc::intrans, dbc::ov3, setstatd(), and dbc::sqlite. Referenced by drvendtran(), drvsetconnectattr(), and drvsetconnectoption(). |
|
Find column given name in string array.
Definition at line 1494 of file sqliteodbc.c. Referenced by drvforeignkeys(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), and fixupdyncols(). |
|
Fixup column information for a running statement.
The "dyncols" field of STMT is filled with column information obtained by SQLite "PRAGMA table_info" for each column whose table name is known. If the types are already present as with SQLite 2.5.7 this information is used instead. Definition at line 1526 of file sqliteodbc.c. References array_size, COL::autoinc, COL::column, stmt::dcols, stmt::dyncols, findcol(), freep(), getmd(), COL::label, mapsqltype(), COL::nosign, stmt::nowchar, stmt::ov3, COL::size, STMT, COL::table, COL::type, COL::typename, xmalloc, and xstrdup. Referenced by drvexecute(), selcb(), and vm_step(). |
|
Fixup query string with optional parameter markers.
Definition at line 1327 of file sqliteodbc.c. References freep(), ISIDCHAR, ISSPACE, and xmalloc. Referenced by drvprepare(). |
|
Free dynamically allocated column descriptions of STMT.
Definition at line 8213 of file sqliteodbc.c. References stmt::cols, stmt::dcols, stmt::dyncols, freep(), stmt::ncols, STMT, and COL::typename. Referenced by drvexecute(), freeresult(), selcb(), and vm_step(). |
|
Free memory given pointer to memory pointer.
Definition at line 760 of file sqliteodbc.c. References xfree. Referenced by dbopen(), drvexecute(), drvprepare(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), fixupdyncols(), fixupsql(), freedyncols(), freeparams(), freeresult(), freerows(), freestmt(), getrowdata(), SQLDisconnect(), and SQLPutData(). |
|
Clear out parameter bindings, if any.
Definition at line 3016 of file sqliteodbc.c. References stmt::bindparms, freep(), BINDPARM::ind, stmt::nbindparms, BINDPARM::param, and STMT. Referenced by drvfreestmt(), and freestmt(). |
|
Free statement's result.
Definition at line 8233 of file sqliteodbc.c. References stmt::bindcols, stmt::cols, freedyncols(), freep(), stmt::nbindcols, stmt::ncols, stmt::nrows, stmt::rowfree, stmt::rows, and STMT. Referenced by drvexecute(), drvfreestmt(), drvprepare(), drvtables(), freestmt(), mkresultset(), and vm_step(). |
|
Free counted array of char pointers.
Definition at line 1032 of file sqliteodbc.c. References freep(). Referenced by vm_step(). |
|
Definition at line 7796 of file sqliteodbc.c. References stmt::bindparms, stmt::dbc, DBC, freep(), freeparams(), freeresult(), dbc::magic, stmt::next, stmt::query, stmt::row_status0, stmt::row_status1, stmt::rowset_size, dbc::stmt, STMT, and xfree. Referenced by drvfreeconnect(), and drvfreestmt(). |
|
Internal free function for HSTMT.
|
|
Get boolean flag from string.
Definition at line 2121 of file sqliteodbc.c. Referenced by dbopen(), and drvconnect(). |
|
Handling of SQLConnect() connection attributes for standalone operation without driver manager.
Definition at line 7438 of file sqliteodbc.c. References min. Referenced by drvconnect(), and drvdriverconnect(). |
|
Get maximum display size and number of decimal points from field type specification.
Definition at line 1170 of file sqliteodbc.c. Referenced by drvcolumns(), drvspecialcolumns(), and fixupdyncols(). |
|
Return number of month days.
Definition at line 1695 of file sqliteodbc.c. Referenced by str2date(), and str2timestamp(). |
|
Internal function to retrieve row data, used by SQLFetch() and friends and SQLGetData().
Definition at line 8332 of file sqliteodbc.c. References stmt::bindcols, stmt::cols, freep(), BINDCOL::lenp, ln_strtod(), mapdeftype(), max, min, stmt::ncols, nomem(), COL::nosign, stmt::nowchar, stmt::nrows, BINDCOL::offs, stmt::ov3, stmt::retr_data, stmt::rowp, stmt::rows, setstat(), STMT, str2date(), str2time(), str2timestamp(), COL::type, and xmalloc. Referenced by dofetchbind(), and SQLGetData(). |
|
Internal locale neutral sprintf("%g") function.
Definition at line 851 of file sqliteodbc.c. Referenced by substparam(). |
|
Internal locale neutral strtod function.
Definition at line 810 of file sqliteodbc.c. Referenced by getrowdata(). |
|
Map SQL_C_DEFAULT to proper C type.
Definition at line 1239 of file sqliteodbc.c. Referenced by getrowdata(), SQLBindCol(), SQLPutData(), and substparam(). |
|
Map SQL field type from string to ODBC integer type code.
Definition at line 1057 of file sqliteodbc.c. References TOLOWER(), xfree, and xmalloc. Referenced by drvcolumns(), drvspecialcolumns(), and fixupdyncols(). |
|
Reallocate space for bound columns.
Definition at line 8285 of file sqliteodbc.c. References stmt::bindcols, BINDCOL::index, BINDCOL::lenp, BINDCOL::max, stmt::nbindcols, nomem(), BINDCOL::offs, STMT, BINDCOL::type, unbindcols(), BINDCOL::valp, xmalloc, and xrealloc. Referenced by drvexecute(), drvprepare(), mkresultset(), SQLBindCol(), and vm_step(). |
|
Setup empty result set from constant column specification.
Definition at line 3664 of file sqliteodbc.c. References stmt::cols, stmt::dbc, DBC, freeresult(), mkbindcols(), stmt::ncols, noconn(), stmt::nrows, stmt::rowp, dbc::sqlite, STMT, and vm_end_if(). Referenced by drvcolumns(), drvforeignkeys(), drvgettypeinfo(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), drvtables(), SQLColumnPrivileges(), SQLProcedureColumns(), SQLProcedures(), and SQLTablePrivileges(). |
|
Internal function to build up data type information as row in result set.
Definition at line 9422 of file sqliteodbc.c. References array_size, stmt::rows, STMT, stringify, and typeSpec. Referenced by drvgettypeinfo(). |
|
Report S1000 (not connected) SQL error given STMT.
Definition at line 788 of file sqliteodbc.c. References stmt::ov3, setstat(), and STMT. Referenced by drvexecute(), drvprepare(), and mkresultset(). |
|
Report S1000 (out of memory) SQL error given STMT.
Definition at line 775 of file sqliteodbc.c. References stmt::ov3, setstat(), and STMT. Referenced by drvbindparam(), drvcolumns(), drvexecute(), drvforeignkeys(), drvgettypeinfo(), drvprepare(), drvprimarykeys(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), drvstatistics(), drvtables(), getrowdata(), mkbindcols(), SQLPutData(), substparam(), vm_start(), and vm_step(). |
|
SQLite callback during drvprepare(), used to collect column information.
Definition at line 11504 of file sqliteodbc.c. References COL::autoinc, stmt::cols, COL::column, COL::db, stmt::dbc, DBC, stmt::dcols, stmt::dyncols, fixupdyncols(), freedyncols(), COL::index, COL::label, stmt::ncols, COL::nosign, COL::prec, COL::scale, COL::size, dbc::sqlite, STMT, COL::table, COL::type, COL::typename, and xmalloc. Referenced by drvprepare(). |
|
Set SQLite options (PRAGMAs) given SQLite handle.
Definition at line 944 of file sqliteodbc.c. References busy_handler(), DBC, and time_func(). Referenced by dbopen(). |
|
Set error message and SQL state on statement.
Definition at line 690 of file sqliteodbc.c. References dbc::logmsg, dbc::naterr, dbc::sqlstate, and STMT. Referenced by drvbindparam(), drvcolattribute(), drvcolattributes(), drvcolumns(), drvdescribecol(), drvexecute(), drvfetchscroll(), drvforeignkeys(), drvfreestmt(), drvprepare(), drvprimarykeys(), drvsetcursorname(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), drvstatistics(), drvunimplstmt(), getrowdata(), noconn(), nomem(), SQLBindCol(), SQLDescribeParam(), SQLGetData(), SQLNativeSql(), SQLPutData(), substparam(), vm_start(), and vm_step(). |
|
Set error message and SQL state on DBC.
Definition at line 650 of file sqliteodbc.c. References DBC, dbc::logmsg, dbc::naterr, and dbc::sqlstate. Referenced by dbopen(), drvconnect(), drvdriverconnect(), drvfreeconnect(), drvgetconnectattr(), drvgetconnectoption(), drvgetinfo(), drvsetconnectattr(), drvsetconnectoption(), drvunimpldbc(), endtran(), and SQLDisconnect(). |
|
Allocate HDBC.
Definition at line 6935 of file sqliteodbc.c. References drvallocconnect(). |
|
Allocate HENV.
Definition at line 6822 of file sqliteodbc.c. References drvallocenv(). |
|
Allocate a HENV, HDBC, or HSTMT handle.
Definition at line 8159 of file sqliteodbc.c. References drvallocconnect(), drvallocenv(), drvallocstmt(), ENV::magic, and ENV::ov3. |
|
Allocate HSTMT given HDBC.
Definition at line 7899 of file sqliteodbc.c. References drvallocstmt(). |
|
Bind C variable to column of result set.
Definition at line 8737 of file sqliteodbc.c. References stmt::bindcols, stmt::bkmrk, stmt::bkmrkcol, stmt::cols, BINDCOL::lenp, mapdeftype(), max, BINDCOL::max, mkbindcols(), stmt::nowchar, BINDCOL::offs, stmt::ov3, setstat(), STMT, COL::type, BINDCOL::type, and BINDCOL::valp. |
|
Bind parameter on HSTMT.
Definition at line 3397 of file sqliteodbc.c. References drvbindparam(). |
|
Bind parameter on HSTMT.
Definition at line 3374 of file sqliteodbc.c. References drvbindparam(). |
|
Function not implemented.
Definition at line 2531 of file sqliteodbc.c. References drvunimpldbc(). |
|
Function not implemented.
Definition at line 2452 of file sqliteodbc.c. References drvunimplstmt(). |
|
Cancel HSTMT closing cursor.
Definition at line 7961 of file sqliteodbc.c. References drvfreestmt(). |
|
Close open cursor.
Definition at line 8143 of file sqliteodbc.c. References drvfreestmt(). |
|
Retrieve column attributes.
Definition at line 11214 of file sqliteodbc.c. References drvcolattribute(). |
|
Retrieve column attributes.
Definition at line 10915 of file sqliteodbc.c. References drvcolattributes(). |
|
Retrieve privileges on columns.
Definition at line 3783 of file sqliteodbc.c. References array_size, colPrivSpec, and mkresultset(). |
|
Retrieve column information on table.
Definition at line 9314 of file sqliteodbc.c. References drvcolumns(). |
|
Connect to SQLite database.
Definition at line 7573 of file sqliteodbc.c. References drvconnect(). |
|
Function not implemented.
Definition at line 5025 of file sqliteodbc.c. |
|
Function not implemented.
Definition at line 2463 of file sqliteodbc.c. |
|
Describe column information.
Definition at line 10602 of file sqliteodbc.c. References drvdescribecol(). |
|
Return information about parameter.
Definition at line 3472 of file sqliteodbc.c. References stmt::nowchar, stmt::nparams, stmt::ov3, setstat(), and STMT. |
|
Disconnect given HDBC.
Definition at line 7624 of file sqliteodbc.c. References DBC, dbc::dbname, dbc::dsn, freep(), dbc::intrans, dbc::magic, setstatd(), dbc::sqlite, vm_end(), and dbc::vm_stmt. |
|
Connect using a driver connection string.
Definition at line 12550 of file sqliteodbc.c. References drvdriverconnect(). |
|
Function not implemented.
Definition at line 2497 of file sqliteodbc.c. |
|
Commit or rollback transaction.
Definition at line 4998 of file sqliteodbc.c. References drvendtran(). |
|
Return last HDBC or HSTMT error message.
Definition at line 11395 of file sqliteodbc.c. References drverror(). |
|
Execute query directly.
Definition at line 11931 of file sqliteodbc.c. References drvexecute(), and drvprepare(). |
|
Execute query.
Definition at line 11916 of file sqliteodbc.c. References drvexecute(). |
|
Fetch result row with scrolling and row status.
Definition at line 10435 of file sqliteodbc.c. References drvfetchscroll(), stmt::row_count0, stmt::row_status, stmt::row_status0, stmt::rowset_size, and STMT. |
|
Fetch next result row.
Definition at line 10405 of file sqliteodbc.c. References drvfetchscroll(). |
|
Fetch result row with scrolling.
Definition at line 10419 of file sqliteodbc.c. References drvfetchscroll(). |
|
Retrieve information about primary/foreign keys.
Definition at line 4786 of file sqliteodbc.c. References drvforeignkeys(). |
|
Free connection (HDBC).
Definition at line 7005 of file sqliteodbc.c. References drvfreeconnect(). |
|
Free HENV.
Definition at line 6860 of file sqliteodbc.c. References drvfreeenv(). |
|
Free a HENV, HDBC, or HSTMT handle.
Definition at line 8193 of file sqliteodbc.c. References drvfreeconnect(), drvfreeenv(), and drvfreestmt(). |
|
Free HSTMT.
Definition at line 7949 of file sqliteodbc.c. References drvfreestmt(). |
|
Get connect attribute of HDBC.
Definition at line 7137 of file sqliteodbc.c. References drvgetconnectattr(). |
|
Get connect option of HDBC.
Definition at line 7338 of file sqliteodbc.c. References drvgetconnectoption(). |
|
Get cursor name of STMT.
Definition at line 8012 of file sqliteodbc.c. References drvgetcursorname(). |
|
Retrieve row data after fetch.
Definition at line 10102 of file sqliteodbc.c. References stmt::bkmrk, getrowdata(), stmt::ncols, stmt::ov3, stmt::rowp, setstat(), and STMT. |
|
Function not implemented.
Definition at line 3557 of file sqliteodbc.c. |
|
Function not implemented.
Definition at line 3613 of file sqliteodbc.c. |
|
Function not implemented.
Definition at line 5546 of file sqliteodbc.c. |
|
Get error message given handle (HENV, HDBC, or HSTMT).
Definition at line 5453 of file sqliteodbc.c. References drvgetdiagrec(). |
|
Get information of HENV.
Definition at line 5264 of file sqliteodbc.c. References ENV::magic, and ENV::ov3. |
|
Return information about supported ODBC API functions.
Definition at line 6648 of file sqliteodbc.c. References array_size, DBC, and SET_EXISTS. |
|
Return information about what this ODBC driver supports.
Definition at line 6539 of file sqliteodbc.c. References drvgetinfo(). |
|
Get option of HSTMT.
Definition at line 5685 of file sqliteodbc.c. References drvgetstmtattr(). |
|
Get option of HSTMT.
Definition at line 5928 of file sqliteodbc.c. References drvgetstmtoption(). |
|
Return data type information.
Definition at line 9754 of file sqliteodbc.c. References drvgettypeinfo(). |
|
Return information for more result sets.
Definition at line 11486 of file sqliteodbc.c. |
|
Translate SQL string.
Definition at line 5043 of file sqliteodbc.c. |
|
Return number of parameters.
Definition at line 3414 of file sqliteodbc.c. References stmt::nparams, and STMT. |
|
Return number of columns of result set given HSTMT.
Definition at line 10491 of file sqliteodbc.c. References stmt::ncols, and STMT. |
|
Retrieve next parameter for sending data to executing query.
Definition at line 3438 of file sqliteodbc.c. References stmt::bindparms, BINDPARM::ind, BINDPARM::need, stmt::nparams, and STMT. |
|
Function not implemented.
Definition at line 3546 of file sqliteodbc.c. References drvunimplstmt(). |
|
Prepare HSTMT.
Definition at line 11879 of file sqliteodbc.c. References drvprepare(). |
|
Retrieve information about indexed columns.
Definition at line 4038 of file sqliteodbc.c. References drvprimarykeys(). |
|
Retrieve information about columns in result set of stored procedures.
Definition at line 5215 of file sqliteodbc.c. References array_size, mkresultset(), and procColSpec. |
|
Retrieve information about stored procedures.
Definition at line 5141 of file sqliteodbc.c. References array_size, mkresultset(), and procSpec. |
|
Put (partial) parameter data into executing statement.
Definition at line 2801 of file sqliteodbc.c. References stmt::bindparms, drvexecute(), freep(), BINDPARM::ind, BINDPARM::len, mapdeftype(), min, BINDPARM::need, nomem(), stmt::nowchar, stmt::nparams, BINDPARM::offs, BINDPARM::param, stmt::query, setstat(), STMT, BINDPARM::stype, BINDPARM::type, and xmalloc. |
|
Return number of affected rows of HSTMT.
Definition at line 10469 of file sqliteodbc.c. References stmt::nrows, and STMT. |
|
Set connect attribute of HDBC.
Definition at line 7216 of file sqliteodbc.c. References drvsetconnectattr(). |
|
Set option on HDBC.
Definition at line 7403 of file sqliteodbc.c. References drvsetconnectoption(). |
|
Set cursor name on STMT.
Definition at line 8103 of file sqliteodbc.c. References drvsetcursorname(). |
|
Function not implemented.
Definition at line 3585 of file sqliteodbc.c. |
|
Function not implemented.
Definition at line 3646 of file sqliteodbc.c. |
|
Set information in HENV.
Definition at line 5311 of file sqliteodbc.c. References ENV::magic, and ENV::ov3. |
|
Set information on parameter.
Definition at line 3532 of file sqliteodbc.c. References drvbindparam(). |
|
Function not implemented.
Definition at line 6054 of file sqliteodbc.c. References drvunimplstmt(). |
|
Function not implemented.
Definition at line 6064 of file sqliteodbc.c. References drvunimplstmt(). |
|
Set option on HSTMT.
Definition at line 5845 of file sqliteodbc.c. References drvsetstmtattr(). |
|
Set option on HSTMT.
Definition at line 6028 of file sqliteodbc.c. References drvsetstmtoption(). |
|
Retrieve information about indexed columns.
Definition at line 4381 of file sqliteodbc.c. References drvspecialcolumns(). |
|
Return statistic information on table indices.
Definition at line 10025 of file sqliteodbc.c. References drvstatistics(). |
|
Retrieve privileges on tables and/or views.
Definition at line 3719 of file sqliteodbc.c. References array_size, mkresultset(), and tablePrivSpec. |
|
Retrieve information on tables and/or views.
Definition at line 9043 of file sqliteodbc.c. References drvtables(). |
|
Commit or rollback transaction.
Definition at line 5012 of file sqliteodbc.c. References drvendtran(). |
|
Convert string to ODBC DATE_STRUCT.
Definition at line 1724 of file sqliteodbc.c. References getmdays(), and ISDIGIT. Referenced by getrowdata(). |
|
Convert string to ODBC TIME_STRUCT.
Definition at line 1804 of file sqliteodbc.c. References ISDIGIT. Referenced by getrowdata(). |
|
Convert string to ODBC TIMESTAMP_STRUCT.
Definition at line 1887 of file sqliteodbc.c. References getmdays(), and ISDIGIT. Referenced by getrowdata(). |
|
Duplicate string using xmalloc().
Definition at line 318 of file sqliteodbc.c. References xmalloc. |
|
Substitute parameter for statement.
Definition at line 3034 of file sqliteodbc.c. References stmt::bindparms, BINDPARM::ind, BINDPARM::len, BINDPARM::lenp, ln_sprintfg(), mapdeftype(), BINDPARM::max, stmt::nbindparms, BINDPARM::need, nomem(), stmt::nowchar, stmt::ov3, BINDPARM::param, setstat(), STMT, BINDPARM::stype, BINDPARM::type, and xmalloc. Referenced by drvexecute(). |
|
SQLite function "current_time_local" etc.
Definition at line 2561 of file sqliteodbc.c. Referenced by setsqliteopts(). |
|
Definition at line 201 of file sqliteodbc.c. References lower_chars, and upper_chars. Referenced by drvtables(), and mapsqltype(). |
|
Helper function to sort type information. Callback for qsort().
Definition at line 9531 of file sqliteodbc.c. Referenced by drvgettypeinfo(). |
|
Reset bound columns to unbound state.
Definition at line 8262 of file sqliteodbc.c. References stmt::bindcols, stmt::bkmrkcol, BINDCOL::index, BINDCOL::lenp, BINDCOL::max, stmt::nbindcols, BINDCOL::offs, STMT, BINDCOL::type, and BINDCOL::valp. Referenced by drvfreestmt(), and mkbindcols(). |
|
Stop running VM.
Definition at line 2381 of file sqliteodbc.c. References stmt::dbc, DBC, STMT, stmt::vm, and dbc::vm_stmt. Referenced by drvexecute(), drvprepare(), drvsetconnectattr(), drvsetconnectoption(), SQLDisconnect(), and vm_end_if(). |
|
Conditionally stop running VM.
Definition at line 2400 of file sqliteodbc.c. References stmt::dbc, DBC, STMT, vm_end(), and dbc::vm_stmt. Referenced by drvfreestmt(), and mkresultset(). |
|
Start VM for execution of SELECT statement.
Definition at line 2417 of file sqliteodbc.c. References stmt::dbc, DBC, dbtracerc, nomem(), stmt::ov3, stmt::query, setstat(), dbc::sqlite, STMT, stmt::vm, dbc::vm_rownum, and dbc::vm_stmt. Referenced by drvexecute(). |
|
Do one VM step gathering one result row.
Definition at line 2246 of file sqliteodbc.c. References COL::autoinc, stmt::cols, COL::column, COL::db, stmt::dbc, DBC, stmt::dcols, stmt::dyncols, fixupdyncols(), freedyncols(), freeresult(), freerows(), COL::index, COL::label, mkbindcols(), stmt::ncols, nomem(), COL::nosign, stmt::nrows, stmt::ov3, COL::prec, stmt::rows, COL::scale, setstat(), COL::size, dbc::sqlite, STMT, COL::table, COL::type, COL::typename, stmt::vm, dbc::vm_rownum, dbc::vm_stmt, xmalloc, and xstrdup. Referenced by drvfetchscroll(). |
|
Initial value: { { "SYSTEM", "COLPRIV", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLPRIV", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLPRIV", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "COLPRIV", "GRANTOR", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLPRIV", "GRANTEE", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLPRIV", "PRIVILEGE", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLPRIV", "IS_GRANTABLE", SCOL_VARCHAR, 50 } }
Definition at line 3757 of file sqliteodbc.c. Referenced by SQLColumnPrivileges(). |
|
Initial value: { { "SYSTEM", "COLUMN", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "COLUMN", "COLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "COLUMN", "DATA_TYPE", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "TYPE_NAME", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "PRECISION", SQL_INTEGER, 50 }, { "SYSTEM", "COLUMN", "LENGTH", SQL_INTEGER, 50 }, { "SYSTEM", "COLUMN", "RADIX", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "SCALE", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "NULLABLE", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "REMARKS", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "COLUMN_DEF", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "SQL_DATA_TYPE", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "SQL_DATETIME_SUB", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "CHAR_OCTET_LENGTH", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "ORDINAL_POSITION", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "IS_NULLABLE", SCOL_VARCHAR, 50 } }
Definition at line 9122 of file sqliteodbc.c. Referenced by drvcolumns(). |
|
Definition at line 217 of file sqliteodbc.c. |
|
Initial value: { { "SYSTEM", "FOREIGNKEY", "PKTABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "FOREIGNKEY", "PKTABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "FOREIGNKEY", "PKTABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "PKCOLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "FKTABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "FOREIGNKEY", "FKTABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "FOREIGNKEY", "FKTABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "FKCOLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "KEY_SEQ", SQL_SMALLINT, 5 }, { "SYSTEM", "FOREIGNKEY", "UPDATE_RULE", SQL_SMALLINT, 5 }, { "SYSTEM", "FOREIGNKEY", "DELETE_RULE", SQL_SMALLINT, 5 }, { "SYSTEM", "FOREIGNKEY", "FK_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "PK_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "FOREIGNKEY", "DEFERRABILITY", SQL_SMALLINT, 5 } }
Definition at line 4453 of file sqliteodbc.c. Referenced by drvforeignkeys(). |
|
Initial value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "_0123456789" Definition at line 235 of file sqliteodbc.c. |
|
Definition at line 198 of file sqliteodbc.c. Referenced by TOLOWER(). |
|
Initial value: { { "SYSTEM", "PRIMARYKEY", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PRIMARYKEY", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PRIMARYKEY", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "PRIMARYKEY", "COLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "PRIMARYKEY", "KEY_SEQ", SQL_SMALLINT, 50 }, { "SYSTEM", "PRIMARYKEY", "PK_NAME", SCOL_VARCHAR, 50 } }
Definition at line 3825 of file sqliteodbc.c. Referenced by drvprimarykeys(). |
|
Initial value: { { "SYSTEM", "PROCCOL", "PROCEDURE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCCOL", "PROCEDURE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCCOL", "PROCEDURE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "PROCCOL", "COLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "PROCCOL", "COLUMN_TYPE", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "DATA_TYPE", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "TYPE_NAME", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCCOL", "PRECISION", SQL_INTEGER, 10 }, { "SYSTEM", "PROCCOL", "LENGTH", SQL_INTEGER, 10 }, { "SYSTEM", "PROCCOL", "RADIX", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "SCALE", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "NULLABLE", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "REMARKS", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCCOL", "COLUMN_DEF", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCCOL", "SQL_DATA_TYPE", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "SQL_DATETIME_SUB", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "CHAR_OCTET_LENGTH", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "ORDINAL_POSITION", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCCOL", "IS_NULLABLE", SCOL_VARCHAR, 50 } }
Definition at line 5177 of file sqliteodbc.c. Referenced by SQLProcedureColumns(). |
|
Initial value: { { "SYSTEM", "PROCEDURE", "PROCEDURE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCEDURE", "PROCEDURE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "PROCEDURE", "PROCEDURE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "PROCEDURE", "NUM_INPUT_PARAMS", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCEDURE", "NUM_OUTPUT_PARAMS", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCEDURE", "NUM_RESULT_SETS", SQL_SMALLINT, 5 }, { "SYSTEM", "PROCEDURE", "REMARKS", SCOL_VARCHAR, 255 }, { "SYSTEM", "PROCEDURE", "PROCEDURE_TYPE", SQL_SMALLINT, 5 } }
Definition at line 5116 of file sqliteodbc.c. Referenced by SQLProcedures(). |
|
Initial value: { { "SYSTEM", "COLUMN", "SCOPE", SQL_SMALLINT, 1 }, { "SYSTEM", "COLUMN", "COLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "COLUMN", "DATA_TYPE", SQL_SMALLINT, 50 }, { "SYSTEM", "COLUMN", "TYPE_NAME", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "PRECISION", SQL_INTEGER, 50 }, { "SYSTEM", "COLUMN", "LENGTH", SQL_INTEGER, 50 }, { "SYSTEM", "COLUMN", "DECIMAL_DIGITS", SQL_INTEGER, 50 }, { "SYSTEM", "COLUMN", "PSEUDO_COLUMN", SQL_SMALLINT, 1 }, { "SYSTEM", "COLUMN", "NULLABLE", SQL_SMALLINT, 1 } }
Definition at line 4104 of file sqliteodbc.c. Referenced by drvspecialcolumns(). |
|
Definition at line 226 of file sqliteodbc.c. |
|
Initial value: { { "SYSTEM", "STATISTICS", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "STATISTICS", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "STATISTICS", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "STATISTICS", "NON_UNIQUE", SQL_SMALLINT, 50 }, { "SYSTEM", "STATISTICS", "INDEX_QUALIFIER", SCOL_VARCHAR, 255 }, { "SYSTEM", "STATISTICS", "INDEX_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "STATISTICS", "TYPE", SQL_SMALLINT, 50 }, { "SYSTEM", "STATISTICS", "ORDINAL_POSITION", SQL_SMALLINT, 50 }, { "SYSTEM", "STATISTICS", "COLUMN_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "STATISTICS", "ASC_OR_DESC", SCOL_CHAR, 1 }, { "SYSTEM", "STATISTICS", "CARDINALITY", SQL_INTEGER, 50 }, { "SYSTEM", "STATISTICS", "PAGES", SQL_INTEGER, 50 }, { "SYSTEM", "STATISTICS", "FILTER_CONDITION", SCOL_VARCHAR, 255 } }
Definition at line 9779 of file sqliteodbc.c. Referenced by drvstatistics(). |
|
Initial value: { { "SYSTEM", "TABLEPRIV", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "TABLEPRIV", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "TABLEPRIV", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "TABLEPRIV", "GRANTOR", SCOL_VARCHAR, 50 }, { "SYSTEM", "TABLEPRIV", "GRANTEE", SCOL_VARCHAR, 50 }, { "SYSTEM", "TABLEPRIV", "PRIVILEGE", SCOL_VARCHAR, 50 }, { "SYSTEM", "TABLEPRIV", "IS_GRANTABLE", SCOL_VARCHAR, 50 } }
Definition at line 3695 of file sqliteodbc.c. Referenced by SQLTablePrivileges(). |
|
Initial value: { { "SYSTEM", "COLUMN", "TABLE_QUALIFIER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "TABLE_OWNER", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "TABLE_NAME", SCOL_VARCHAR, 255 }, { "SYSTEM", "COLUMN", "TABLE_TYPE", SCOL_VARCHAR, 50 }, { "SYSTEM", "COLUMN", "REMARKS", SCOL_VARCHAR, 50 } }
Definition at line 8825 of file sqliteodbc.c. Referenced by drvtables(). |
|
Initial value: { { "SYSTEM", "TYPE", "TYPE_NAME", SCOL_VARCHAR, 50 }, { "SYSTEM", "TYPE", "DATA_TYPE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "PRECISION", SQL_INTEGER, 4 }, { "SYSTEM", "TYPE", "LITERAL_PREFIX", SCOL_VARCHAR, 50 }, { "SYSTEM", "TYPE", "LITERAL_SUFFIX", SCOL_VARCHAR, 50 }, { "SYSTEM", "TYPE", "CREATE_PARAMS", SCOL_VARCHAR, 50 }, { "SYSTEM", "TYPE", "NULLABLE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "CASE_SENSITIVE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "SEARCHABLE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "UNSIGNED_ATTRIBUTE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "MONEY", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "AUTO_INCREMENT", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "LOCAL_TYPE_NAME", SCOL_VARCHAR, 50 }, { "SYSTEM", "TYPE", "MINIMUM_SCALE", SQL_SMALLINT, 2 }, { "SYSTEM", "TYPE", "MAXIMUM_SCALE", SQL_SMALLINT, 2 } }
Definition at line 9394 of file sqliteodbc.c. Referenced by drvgettypeinfo(), and mktypeinfo(). |
|
Definition at line 197 of file sqliteodbc.c. Referenced by TOLOWER(). |