Copyright (c) 2004-2006 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 sqlite3odbc.c.
#include "sqlite3odbc.h"
Go to the source code of this file.
Data Structures | |
struct | tblres |
Defines | |
#define | ODBC_INI ".odbc.ini" |
#define | DRIVER_VER_INFO "0.0" |
#define | COLATTRIBUTE_LAST_ARG_TYPE SQLPOINTER |
#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 | 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)) |
Typedefs | |
typedef tblres | TBLRES |
Functions | |
static int | TOLOWER (int c) |
static void | unbindcols (STMT *s) |
Reset bound columns to unbound state. | |
static SQLRETURN | mkbindcols (STMT *s, int ncols) |
Reallocate space for bound columns. | |
static void | freeresult (STMT *s, int clrcols) |
Free statement's result. | |
static SQLRETURN | freestmt (HSTMT stmt) |
Internal free function for HSTMT. | |
static SQLRETURN | substparam (STMT *s, char **sqlp, int pnum, char **outp) |
Substitute parameter for statement. | |
static void | freedyncols (STMT *s) |
Free dynamically allocated column descriptions of STMT. | |
static SQLRETURN | drvexecute (SQLHSTMT stmt, int initial) |
Internal query execution used by SQLExecute() and SQLExecDirect(). | |
static void | dbtraceapi (DBC *d, char *fn, const char *sql) |
Trace function for SQLite API calls. | |
static char * | strdup_ (const char *str) |
Duplicate string using xmalloc(). | |
static void | freerows (char **rowp) |
Free counted array of char pointers. | |
static int | drvgettable_row (TBLRES *t, int ncol, int rc) |
static int | drvgettable (DBC *d, const char *sql, char ***resp, int *nrowp, int *ncolp, char **errp) |
static void | setstatd (DBC *d, int naterr, char *msg, char *st,...) |
Set error message and SQL state on DBC. | |
static void | setstat (STMT *s, int naterr, char *msg, char *st,...) |
Set error message and SQL state on statement. | |
static SQLRETURN | drvunimpldbc (HDBC dbc) |
Report IM001 (not implemented) SQL error code for HDBC. | |
static SQLRETURN | drvunimplstmt (HSTMT stmt) |
Report IM001 (not implemented) SQL error code for HSTMT. | |
static void | freep (void *x) |
Free memory given pointer to memory pointer. | |
static SQLRETURN | nomem (STMT *s) |
Report S1000 (out of memory) SQL error given STMT. | |
static SQLRETURN | noconn (STMT *s) |
Report S1000 (not connected) SQL error given STMT. | |
static double | ln_strtod (const char *data, char **endp) |
Internal locale neutral strtod function. | |
static int | busy_handler (void *udata, int count) |
Busy callback for SQLite. | |
static int | setsqliteopts (sqlite3 *x, DBC *d) |
Set SQLite options (PRAGMAs) given SQLite handle. | |
static int | mapsqltype (const char *typename, int *nosign, int ov3) |
Map SQL field type from string to ODBC integer type code. | |
static void | getmd (const char *typename, int sqltype, int *mp, int *dp) |
Get maximum display size and number of decimal points from field type specification. | |
static int | mapdeftype (int type, int stype, int nosign) |
Map SQL_C_DEFAULT to proper C type. | |
static char * | fixupsql (char *sql, int sqlLen, int *nparam, int *isselect, char **errmsg) |
Fixup query string with optional parameter markers. | |
static int | findcol (char **cols, int ncols, char *name) |
Find column given name in string array. | |
static void | fixupdyncols (STMT *s, DBC *d) |
Fixup column information for a running statement. | |
static int | getmdays (int year, int month) |
Return number of month days. | |
static int | str2date (char *str, DATE_STRUCT *ds) |
Convert string to ODBC DATE_STRUCT. | |
static int | str2time (char *str, TIME_STRUCT *ts) |
Convert string to ODBC TIME_STRUCT. | |
static int | str2timestamp (char *str, TIMESTAMP_STRUCT *tss) |
Convert string to ODBC TIMESTAMP_STRUCT. | |
static int | getbool (char *string) |
Get boolean flag from string. | |
static void | dbtrace (void *arg, const char *msg) |
SQLite trace callback. | |
static void | dbtracerc (DBC *d, int rc, char *err) |
Trace function for SQLite return codes. | |
static SQLRETURN | dbopen (DBC *d, char *name, char *dsn, char *sflag, char *spflag, char *ntflag, char *busy) |
Open SQLite database file given file name and flags. | |
static char * | s3stmt_coltype (sqlite3_stmt *s3stmt, int col, DBC *d) |
Find out column type SQLite statement pointer column number DBC pointer (for tracing only)
| |
static int | s3stmt_step (STMT *s) |
Do one sqlite statement step gathering one result row. | |
static void | s3stmt_end (STMT *s) |
Stop running sqlite statement. | |
static void | s3stmt_end_if (STMT *s) |
Conditionally stop running sqlite statement. | |
static SQLRETURN | s3stmt_start (STMT *s, char **params) |
Start sqlite statement 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. | |
SQLRETURN SQL_API | SQLPutData (SQLHSTMT stmt, SQLPOINTER data, SQLLEN len) |
Put (partial) parameter data into executing statement. | |
static SQLRETURN | freeparams (STMT *s) |
Clear out parameter bindings, if any. | |
static SQLRETURN | drvbindparam (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT iotype, SQLSMALLINT buftype, SQLSMALLINT ptype, SQLUINTEGER coldef, SQLSMALLINT scale, SQLPOINTER data, SQLINTEGER buflen, SQLLEN *len) |
Internal bind parameter on HSTMT. | |
SQLRETURN SQL_API | SQLBindParameter (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT iotype, SQLSMALLINT buftype, SQLSMALLINT ptype, SQLULEN coldef, SQLSMALLINT scale, SQLPOINTER data, SQLLEN buflen, SQLLEN *len) |
Bind parameter on HSTMT. | |
SQLRETURN SQL_API | SQLBindParam (SQLHSTMT stmt, SQLUSMALLINT pnum, SQLSMALLINT vtype, SQLSMALLINT ptype, SQLULEN lenprec, SQLSMALLINT scale, SQLPOINTER val, SQLLEN *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, SQLULEN coldef, SQLSMALLINT scale, SQLPOINTER val, SQLLEN *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, SQLLEN *len, SQLSMALLINT *prec, SQLSMALLINT *scale, SQLSMALLINT *nullable) |
Function not implemented. | |
SQLRETURN SQL_API | SQLSetDescRec (SQLHDESC handle, SQLSMALLINT recno, SQLSMALLINT type, SQLSMALLINT subtype, SQLLEN len, SQLSMALLINT prec, SQLSMALLINT scale, SQLPOINTER data, SQLLEN *strlen, SQLLEN *indicator) |
Function not implemented. | |
static 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. | |
static 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. | |
static 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. | |
static 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. | |
static SQLRETURN | endtran (DBC *d, SQLSMALLINT comptype) |
Internal commit or rollback transaction. | |
static 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. | |
static 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. | |
static 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. | |
static 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. | |
static 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. | |
static SQLRETURN | drvsetstmtoption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLUINTEGER param) |
Internal set option on HSTMT. | |
SQLRETURN SQL_API | SQLSetStmtOption (SQLHSTMT stmt, SQLUSMALLINT opt, SQLROWCOUNT 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, SQLLEN rowkeyset, SQLUSMALLINT rowset) |
Function not implemented. | |
static 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. | |
static SQLRETURN | drvallocenv (SQLHENV *env) |
Internal allocate HENV. | |
SQLRETURN SQL_API | SQLAllocEnv (SQLHENV *env) |
Allocate HENV. | |
static SQLRETURN | drvfreeenv (SQLHENV env) |
Internal free HENV. | |
SQLRETURN SQL_API | SQLFreeEnv (SQLHENV env) |
Free HENV. | |
static SQLRETURN | drvallocconnect (SQLHENV env, SQLHDBC *dbc) |
Internal allocate HDBC. | |
SQLRETURN SQL_API | SQLAllocConnect (SQLHENV env, SQLHDBC *dbc) |
Allocate HDBC. | |
static SQLRETURN | drvfreeconnect (SQLHDBC dbc) |
Internal free connection (HDBC). | |
SQLRETURN SQL_API | SQLFreeConnect (SQLHDBC dbc) |
Free connection (HDBC). | |
static 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. | |
static 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. | |
static 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. | |
static SQLRETURN | drvsetconnectoption (SQLHDBC dbc, SQLUSMALLINT opt, SQLUINTEGER param) |
Internal set option on HDBC. | |
SQLRETURN SQL_API | SQLSetConnectOption (SQLHDBC dbc, SQLUSMALLINT opt, SQLULEN param) |
Set option on HDBC. | |
static int | getdsnattr (char *dsn, char *attr, char *out, int outLen) |
Handling of SQLConnect() connection attributes for standalone operation without driver manager. | |
static 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. | |
static 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. | |
static SQLRETURN | freestmt (SQLHSTMT stmt) |
static 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. | |
static 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. | |
static 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. | |
static 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. | |
static SQLRETURN | getrowdata (STMT *s, SQLUSMALLINT col, SQLSMALLINT otype, SQLPOINTER val, SQLINTEGER len, SQLLEN *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, SQLLEN max, SQLLEN *lenp) |
Bind C variable to column of result set. | |
static 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. | |
static 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. | |
static 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. | |
static int | typeinfosort (const void *a, const void *b) |
Helper function to sort type information. | |
static SQLRETURN | drvgettypeinfo (SQLHSTMT stmt, SQLSMALLINT sqltype) |
Internal return data type information. | |
SQLRETURN SQL_API | SQLGetTypeInfo (SQLHSTMT stmt, SQLSMALLINT sqltype) |
Return data type information. | |
static 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, SQLLEN len, SQLLEN *lenp) |
Retrieve row data after fetch. | |
static SQLRETURN | dofetchbind (STMT *s, int rsi) |
Internal: fetch and bind from statement's current row. | |
static 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, SQLLEN offset) |
Fetch result row with scrolling. | |
SQLRETURN SQL_API | SQLExtendedFetch (SQLHSTMT stmt, SQLUSMALLINT orient, SQLLEN offset, SQLULEN *rowcount, SQLUSMALLINT *rowstatus) |
Fetch result row with scrolling and row status. | |
SQLRETURN SQL_API | SQLRowCount (SQLHSTMT stmt, SQLLEN *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. | |
static SQLRETURN | drvdescribecol (SQLHSTMT stmt, SQLUSMALLINT col, SQLCHAR *name, SQLSMALLINT nameMax, SQLSMALLINT *nameLen, SQLSMALLINT *type, SQLULEN *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, SQLULEN *size, SQLSMALLINT *digits, SQLSMALLINT *nullable) |
Describe column information. | |
static SQLRETURN | drvcolattributes (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLLEN *val2) |
Internal retrieve column attributes. | |
SQLRETURN SQL_API | SQLColAttributes (SQLHSTMT stmt, SQLUSMALLINT col, SQLUSMALLINT id, SQLPOINTER val, SQLSMALLINT valMax, SQLSMALLINT *valLen, SQLLEN *val2) |
Retrieve column attributes. | |
static 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, COLATTRIBUTE_LAST_ARG_TYPE val2) |
Retrieve column attributes. | |
static 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. | |
static 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 | |
static const char * | xdigits = "0123456789ABCDEFabcdef" |
static const char | upper_chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
static const char | lower_chars [] = "abcdefghijklmnopqrstuvwxyz" |
static const char | digit_chars [] = "0123456789" |
static const char | space_chars [] = " \f\n\r\t\v" |
static const char | id_chars [] |
static COL | tablePrivSpec [] |
Columns for result set of SQLTablePrivileges(). | |
static COL | colPrivSpec [] |
Columns for result set of SQLColumnPrivileges(). | |
static COL | pkeySpec [] |
Columns for result set of SQLPrimaryKeys(). | |
static COL | scolSpec [] |
Columns for result set of SQLSpecialColumns(). | |
static COL | fkeySpec [] |
Columns for result set of SQLForeignKeys(). | |
static COL | procSpec [] |
Columns for result set of SQLProcedures(). | |
static COL | procColSpec [] |
Columns for result set of SQLProcedureColumns(). | |
static COL | tableSpec [] |
Columns for result set of SQLTables(). | |
static COL | colSpec [] |
Columns for result set of SQLColumns(). | |
static COL | typeSpec [] |
Columns for result set of SQLGetTypeInfo(). | |
static COL | statSpec [] |
Columns for result set of SQLStatistics(). |
|
Definition at line 40 of file sqlite3odbc.c. Referenced by drvcolumns(), drvforeignkeys(), drvgettypeinfo(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), drvtables(), mktypeinfo(), SQLColumnPrivileges(), SQLGetFunctions(), SQLProcedureColumns(), SQLProcedures(), and SQLTablePrivileges(). |
|
|
|
Definition at line 32 of file sqlite3odbc.c. |
|
Definition at line 53 of file sqlite3odbc.c. Referenced by drvallocconnect(), drvallocstmt(), drvconnect(), drverror(), drvfreeconnect(), freestmt(), and SQLDisconnect(). |
|
Definition at line 54 of file sqlite3odbc.c. Referenced by drvfreeconnect(), drvfreeenv(), and drvgetstmtattr(). |
|
Definition at line 28 of file sqlite3odbc.c. Referenced by drvgetinfo(). |
|
Definition at line 399 of file sqlite3odbc.c. Referenced by drvallocconnect(). |
|
Definition at line 400 of file sqlite3odbc.c. Referenced by drvfreeconnect(). |
|
Definition at line 52 of file sqlite3odbc.c. Referenced by drvallocconnect(), drvallocenv(), drvfreeconnect(), drvfreeenv(), SQLAllocHandle(), SQLGetEnvAttr(), and SQLSetEnvAttr(). |
|
Definition at line 219 of file sqlite3odbc.c. Referenced by str2date(), str2time(), and str2timestamp(). |
|
Definition at line 239 of file sqlite3odbc.c. |
|
Definition at line 228 of file sqlite3odbc.c. Referenced by drvgettable(), and fixupsql(). |
|
Definition at line 38 of file sqlite3odbc.c. Referenced by drvbindparam(). |
|
Definition at line 36 of file sqlite3odbc.c. Referenced by drvallocconnect(), drvcolumns(), drvconnect(), drvdriverconnect(), drverror(), drvforeignkeys(), drvgetcursorname(), drvprimarykeys(), drvsetcursorname(), drvspecialcolumns(), drvstatistics(), drvtables(), getdsnattr(), and SQLNativeSql(). |
|
Definition at line 20 of file sqlite3odbc.c. Referenced by drvconnect(), and drvdriverconnect(). |
|
Definition at line 50 of file sqlite3odbc.c. |
|
Definition at line 49 of file sqlite3odbc.c. |
|
|
|
Definition at line 43 of file sqlite3odbc.c. Referenced by drvstatistics(), and mktypeinfo(). |
|
Definition at line 42 of file sqlite3odbc.c. |
|
Value: { \ int len = strlen(src); \ int cnt = min(len + 1, max); \ strncpy(dst, src, cnt); \ *lenp = (cnt > len) ? len : cnt; \ } Definition at line 5171 of file sqlite3odbc.c. Referenced by drvgetinfo(). |
|
Definition at line 45 of file sqlite3odbc.c. Referenced by drvallocconnect(). |
|
Definition at line 182 of file sqlite3odbc.c. Referenced by drvfreeconnect(), drvfreeenv(), freep(), freestmt(), and mapsqltype(). |
|
Definition at line 180 of file sqlite3odbc.c. Referenced by drvallocconnect(), drvallocenv(), drvallocstmt(), drvbindparam(), drvcolumns(), drvgettable(), drvgettable_row(), drvgettypeinfo(), drvprepare(), drvsetstmtattr(), drvsetstmtoption(), drvstatistics(), drvtables(), fixupsql(), getrowdata(), mapsqltype(), mkbindcols(), s3stmt_step(), strdup_(), and substparam(). |
|
Definition at line 181 of file sqlite3odbc.c. Referenced by drvbindparam(), drvgettable_row(), and mkbindcols(). |
|
Definition at line 183 of file sqlite3odbc.c. Referenced by dbopen(), drvcolumns(), drvprepare(), drvstatistics(), and s3stmt_step(). |
|
|
|
Busy callback for SQLite.
Definition at line 848 of file sqlite3odbc.c. References dbc::t0, and dbc::timeout. Referenced by endtran(), and setsqliteopts(). |
|
Open SQLite database file given file name and flags.
Definition at line 2007 of file sqlite3odbc.c. References dbc::curtype, dbc::dbname, dbtrace(), dbc::dsn, freep(), getbool(), setsqliteopts(), setstatd(), dbc::sqlite, dbc::step_enable, dbc::timeout, dbc::trace, dbc::trans_disable, and xstrdup. Referenced by drvconnect(), and drvdriverconnect(). |
|
SQLite trace callback.
Definition at line 1944 of file sqlite3odbc.c. References dbc::trace. Referenced by dbopen(). |
|
Trace function for SQLite API calls.
Definition at line 1966 of file sqlite3odbc.c. References dbc::trace. Referenced by drvcolumns(), drvforeignkeys(), drvgettable(), drvprepare(), drvprimarykeys(), drvspecialcolumns(), drvstatistics(), drvtables(), s3stmt_end(), s3stmt_start(), and s3stmt_step(). |
|
Trace function for SQLite return codes.
Definition at line 1985 of file sqlite3odbc.c. References dbc::trace. Referenced by drvprepare(), endtran(), and s3stmt_start(). |
|
Internal: fetch and bind from statement's current row.
Definition at line 8717 of file sqlite3odbc.c. References stmt::bind_offs, stmt::bind_type, stmt::bindcols, stmt::bkmrk, stmt::bkmrkcol, BINDCOL::lenp, stmt::ncols, stmt::row_status0, stmt::rowp, SQLLEN, and BINDCOL::valp. |
|
Internal allocate HDBC.
Definition at line 5879 of file sqlite3odbc.c. References dbc::autocommit, dbc::curtype, DBC_MAGIC, ENV::dbcs, drvgetgpps, dbc::env, ENV_MAGIC, dbc::magic, ENV::magic, min, dbc::next, ENV::ov3, dbc::ov3, dbc::ov3val, verinfo, dbc::version, and xmalloc. Referenced by SQLAllocConnect(), and SQLAllocHandle(). |
|
Internal allocate HENV.
Definition at line 5802 of file sqlite3odbc.c. References ENV::dbcs, ENV_MAGIC, ENV::magic, ENV::ov3, and xmalloc. Referenced by SQLAllocEnv(), and SQLAllocHandle(). |
|
Allocate HSTMT given HDBC (driver internal version).
Definition at line 6750 of file sqlite3odbc.c. References dbc::curtype, DBC_MAGIC, dbc::longnames, dbc::magic, stmt::next, dbc::ov3, dbc::stmt, and xmalloc. Referenced by SQLAllocHandle(), and SQLAllocStmt(). |
|
Internal bind parameter on HSTMT.
Definition at line 2867 of file sqlite3odbc.c. References stmt::bindparms, freep(), BINDPARM::inc, BINDPARM::len, BINDPARM::lenp, BINDPARM::max, max, stmt::nbindparms, BINDPARM::need, nomem(), BINDPARM::offs, stmt::ov3, BINDPARM::param, BINDPARM::param0, BINDPARM::parbuf, setstat(), BINDPARM::stype, BINDPARM::type, xmalloc, and xrealloc. Referenced by SQLBindParam(), SQLBindParameter(), and SQLSetParam(). |
|
Internal retrieve column attributes.
Definition at line 9433 of file sqlite3odbc.c. References COL::autoinc, stmt::cols, COL::column, COL::db, COL::label, stmt::ncols, COL::nosign, COL::prec, COL::scale, setstat(), COL::size, COL::table, COL::type, and COL::typename. Referenced by SQLColAttribute(). |
|
Internal retrieve column attributes.
Definition at line 9195 of file sqlite3odbc.c. References COL::autoinc, stmt::cols, COL::column, COL::label, stmt::ncols, COL::nosign, COL::prec, COL::scale, setstat(), COL::size, COL::table, COL::type, and COL::typename. Referenced by SQLColAttributes(). |
|
Internal retrieve column information on table.
Definition at line 7901 of file sqlite3odbc.c. References array_size, colSpec, stmt::dbc, dbtraceapi(), freerows(), min, mkresultset(), nomem(), stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, xmalloc, and xstrdup. Referenced by SQLColumns(). |
|
Internal connect to SQLite database.
Definition at line 6403 of file sqlite3odbc.c. References DBC_MAGIC, dbopen(), getbool(), getdsnattr(), dbc::longnames, dbc::magic, min, ODBC_INI, dbc::ov3, setstatd(), dbc::sqlite, and dbc::trace. Referenced by SQLConnect(). |
|
Internal describe column information.
Definition at line 9109 of file sqlite3odbc.c. References stmt::cols, COL::column, stmt::ncols, stmt::ov3, setstat(), COL::size, and COL::type. Referenced by SQLDescribeCol(). |
|
Internal standalone (w/o driver manager) database connect.
Definition at line 6556 of file sqlite3odbc.c. References dbopen(), getbool(), getdsnattr(), dbc::longnames, min, ODBC_INI, setstatd(), dbc::sqlite, and dbc::trace. Referenced by SQLDriverConnect(). |
|
Internal commit or rollback transaction.
Definition at line 4304 of file sqlite3odbc.c. References endtran(). Referenced by SQLEndTran(), and SQLTransact(). |
|
Internal return last HDBC or HSTMT error message.
Definition at line 9682 of file sqlite3odbc.c. References DBC_MAGIC, dbc::logmsg, stmt::logmsg, dbc::magic, min, dbc::naterr, stmt::naterr, dbc::sqlstate, and stmt::sqlstate. Referenced by SQLError(). |
|
Internal query execution used by SQLExecute() and SQLExecDirect().
Definition at line 10010 of file sqlite3odbc.c. References dbc::autocommit, stmt::bindparms, stmt::dbc, freep(), dbc::intrans, stmt::nbindparms, noconn(), stmt::nparams, stmt::ov3, BINDPARM::param, stmt::query, s3stmt_end(), setstat(), dbc::sqlite, and dbc::trans_disable. Referenced by SQLExecDirect(), and SQLExecute(). |
|
Internal fetch function for SQLFetchScroll() and SQLExtendedFetch().
Definition at line 8805 of file sqlite3odbc.c. References stmt::row_status0, and stmt::rowset_size. Referenced by SQLExtendedFetch(), SQLFetch(), and SQLFetchScroll(). |
|
Internal retrieve information about primary/foreign keys.
Definition at line 3901 of file sqlite3odbc.c. References array_size, stmt::dbc, dbtraceapi(), findcol(), fkeySpec, min, mkresultset(), stmt::ov3, and setstat(). Referenced by SQLForeignKeys(). |
|
Internal free connection (HDBC).
Definition at line 5945 of file sqlite3odbc.c. References DBC_MAGIC, ENV::dbcs, DEAD_MAGIC, drvrelgpps, dbc::env, ENV_MAGIC, freestmt(), ENV::magic, dbc::magic, dbc::next, dbc::ov3, setstatd(), dbc::sqlite, dbc::stmt, dbc::trace, and xfree. Referenced by SQLFreeConnect(), and SQLFreeHandle(). |
|
Internal free HENV.
Definition at line 5840 of file sqlite3odbc.c. References ENV::dbcs, DEAD_MAGIC, ENV_MAGIC, ENV::magic, and xfree. Referenced by SQLFreeEnv(), and SQLFreeHandle(). |
|
Internal function to perform certain kinds of free/close on STMT.
Definition at line 6815 of file sqlite3odbc.c. References freeparams(), freeresult(), freestmt(), s3stmt_end_if(), setstat(), and unbindcols(). Referenced by SQLCancel(), SQLCloseCursor(), SQLFreeHandle(), and SQLFreeStmt(). |
|
Internal get connect attribute of HDBC.
Definition at line 6017 of file sqlite3odbc.c. References dbc::autocommit, dbc::curtype, dbc::ov3, setstatd(), and dbc::sqlite. Referenced by SQLGetConnectAttr(). |
|
Internal get connect option of HDBC.
Definition at line 6205 of file sqlite3odbc.c. References dbc::autocommit, dbc::curtype, dbc::ov3, and setstatd(). Referenced by SQLGetConnectOption(). |
|
Internal function to get cursor name of STMT.
Definition at line 6879 of file sqlite3odbc.c. References stmt::cursorname, and min. Referenced by SQLGetCursorName(). |
|
Internal get error message given handle (HENV, HDBC, or HSTMT).
Definition at line 4613 of file sqlite3odbc.c. References stmt::logmsg, dbc::logmsg, stmt::naterr, dbc::naterr, stmt::sqlstate, and dbc::sqlstate. Referenced by SQLGetDiagRec(). |
|
Internal return information about what this ODBC driver supports.
Definition at line 5189 of file sqlite3odbc.c. References dbc::dbname, DRIVER_VER_INFO, dbc::dsn, dbc::ov3, setstatd(), and strmak. Referenced by SQLGetInfo(). |
|
Internal get option of HSTMT.
Definition at line 4733 of file sqlite3odbc.c. References stmt::bind_offs, stmt::bind_type, stmt::bkmrk, dbc::cur_s3stmt, stmt::curtype, stmt::dbc, DEAD_MAGIC, 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, and dbc::s3stmt_rownum. Referenced by SQLGetStmtAttr(). |
|
Internal get option of HSTMT.
Definition at line 5002 of file sqlite3odbc.c. References dbc::cur_s3stmt, stmt::curtype, stmt::dbc, drvunimplstmt(), stmt::retr_data, stmt::rowp, stmt::rowset_size, and dbc::s3stmt_rownum. Referenced by SQLGetStmtOption(). |
|
Definition at line 523 of file sqlite3odbc.c. References dbtraceapi(), drvgettable_row(), tblres::errmsg, freerows(), ISSPACE, tblres::nalloc, tblres::ncol, tblres::ndata, tblres::nres, tblres::nrow, tblres::rc, tblres::resarr, dbc::sqlite, tblres::stmt, and xmalloc. |
|
Definition at line 437 of file sqlite3odbc.c. References tblres::nalloc, tblres::ncol, tblres::ndata, nomem(), tblres::nrow, tblres::rc, tblres::resarr, tblres::stmt, xmalloc, and xrealloc. Referenced by drvgettable(). |
|
Internal return data type information.
Definition at line 8224 of file sqlite3odbc.c. References array_size, stmt::dbc, mkresultset(), mktypeinfo(), nomem(), stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, typeinfosort(), typeSpec, and xmalloc. Referenced by SQLGetTypeInfo(). |
|
Internal query preparation used by SQLPrepare() and SQLExecDirect().
Definition at line 9814 of file sqlite3odbc.c. References stmt::cols, stmt::dbc, dbtraceapi(), dbtracerc(), stmt::dcols, stmt::dyncols, fixupdyncols(), fixupsql(), freedyncols(), freep(), freeresult(), stmt::isselect, stmt::longnames, noconn(), nomem(), stmt::nparams, stmt::ov3, stmt::query, s3stmt_coltype(), s3stmt_end(), setstat(), dbc::sqlite, dbc::trace, xmalloc, and xstrdup. Referenced by SQLExecDirect(), and SQLPrepare(). |
|
Internal retrieve information about indexed columns.
Definition at line 3342 of file sqlite3odbc.c. References array_size, stmt::dbc, dbtraceapi(), findcol(), min, mkresultset(), nomem(), stmt::ov3, pkeySpec, setstat(), and dbc::sqlite. Referenced by SQLPrimaryKeys(). |
|
Internal set connect attribute of HDBC.
Definition at line 6148 of file sqlite3odbc.c. References dbc::autocommit, dbc::cur_s3stmt, endtran(), dbc::intrans, s3stmt_end(), and setstatd(). Referenced by SQLSetConnectAttr(). |
|
Internal set option on HDBC.
Definition at line 6306 of file sqlite3odbc.c. References dbc::autocommit, dbc::cur_s3stmt, endtran(), dbc::intrans, s3stmt_end(), and setstatd(). Referenced by SQLSetConnectOption(). |
|
Internal function to set cursor name on STMT.
Definition at line 6929 of file sqlite3odbc.c. References stmt::cursorname, min, stmt::ov3, and setstat(). Referenced by SQLSetCursorName(). |
|
Internal set option on HSTMT.
Definition at line 4858 of file sqlite3odbc.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(), and xmalloc. Referenced by SQLSetStmtAttr(). |
|
Internal set option on HSTMT.
Definition at line 5069 of file sqlite3odbc.c. References stmt::curtype, drvunimplstmt(), freep(), nomem(), stmt::retr_data, stmt::row_status0, stmt::row_status1, stmt::rowset_size, setstat(), and xmalloc. Referenced by SQLSetStmtOption(). |
|
Internal retrieve information about indexed columns.
Definition at line 3592 of file sqlite3odbc.c. References array_size, stmt::dbc, dbtraceapi(), findcol(), min, mkresultset(), nomem(), stmt::ov3, scolSpec, setstat(), and dbc::sqlite. Referenced by SQLSpecialColumns(). |
|
Internal return statistic information on table indices.
Definition at line 8430 of file sqlite3odbc.c. References array_size, stmt::dbc, dbtraceapi(), findcol(), freerows(), min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::ov3, stmt::rowfree, stmt::rows, setstat(), dbc::sqlite, statSpec, stringify, xmalloc, and xstrdup. Referenced by SQLStatistics(). |
|
Retrieve information on tables and/or views.
Definition at line 7654 of file sqlite3odbc.c. References array_size, stmt::dbc, dbc::dbname, dbtraceapi(), freeresult(), min, mkresultset(), stmt::ncols, nomem(), stmt::nrows, stmt::rowfree, stmt::rowp, stmt::rows, dbc::sqlite, tableSpec, TOLOWER(), and xmalloc. Referenced by SQLTables(). |
|
Report IM001 (not implemented) SQL error code for HDBC.
Definition at line 730 of file sqlite3odbc.c. References setstatd(). Referenced by SQLBrowseConnect(). |
|
Report IM001 (not implemented) SQL error code for HSTMT.
Definition at line 749 of file sqlite3odbc.c. References setstat(). Referenced by drvgetstmtattr(), drvgetstmtoption(), drvsetstmtattr(), drvsetstmtoption(), SQLBulkOperations(), SQLParamOptions(), SQLSetPos(), and SQLSetScrollOptions(). |
|
Internal commit or rollback transaction.
Definition at line 4236 of file sqlite3odbc.c. References dbc::autocommit, busy_handler(), 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 1323 of file sqlite3odbc.c. Referenced by drvforeignkeys(), drvprimarykeys(), drvspecialcolumns(), and drvstatistics(). |
|
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 1354 of file sqlite3odbc.c. References COL::column, stmt::dcols, stmt::dyncols, COL::label, stmt::longnames, and COL::table. Referenced by drvprepare(), and s3stmt_step(). |
|
Fixup query string with optional parameter markers.
Definition at line 1189 of file sqlite3odbc.c. References freep(), ISSPACE, and xmalloc. Referenced by drvprepare(). |
|
Free dynamically allocated column descriptions of STMT.
Definition at line 7044 of file sqlite3odbc.c. References stmt::cols, stmt::dcols, stmt::dyncols, freep(), stmt::ncols, and COL::typename. Referenced by drvprepare(), freeresult(), and s3stmt_step(). |
|
Free memory given pointer to memory pointer.
Definition at line 767 of file sqlite3odbc.c. References xfree. Referenced by dbopen(), drvbindparam(), drvexecute(), drvprepare(), drvsetstmtattr(), drvsetstmtoption(), fixupsql(), freedyncols(), freeparams(), freeresult(), freerows(), freestmt(), getrowdata(), SQLDisconnect(), SQLPutData(), and substparam(). |
|
Clear out parameter bindings, if any.
Definition at line 2582 of file sqlite3odbc.c. References stmt::bindparms, freep(), stmt::nbindparms, and BINDPARM::parbuf. Referenced by drvfreestmt(), and freestmt(). |
|
Free statement's result.
Definition at line 7064 of file sqlite3odbc.c. References stmt::bincache, stmt::bincell, stmt::bindcols, stmt::binlen, freedyncols(), freep(), stmt::nbindcols, stmt::nrows, stmt::rowfree, and stmt::rows. Referenced by drvfreestmt(), drvprepare(), drvtables(), freestmt(), and mkresultset(). |
|
Free counted array of char pointers.
Definition at line 933 of file sqlite3odbc.c. References freep(). Referenced by drvcolumns(), drvgettable(), and drvstatistics(). |
|
Definition at line 6699 of file sqlite3odbc.c. References stmt::bindparms, stmt::dbc, DBC_MAGIC, freep(), freeparams(), freeresult(), dbc::magic, stmt::next, stmt::query, stmt::row_status0, stmt::row_status1, stmt::rowset_size, dbc::stmt, and xfree. |
|
Internal free function for HSTMT.
Referenced by drvfreeconnect(), and drvfreestmt(). |
|
Get boolean flag from string.
Definition at line 1930 of file sqlite3odbc.c. Referenced by dbopen(), drvconnect(), drvdriverconnect(), and getrowdata(). |
|
Handling of SQLConnect() connection attributes for standalone operation without driver manager.
Definition at line 6357 of file sqlite3odbc.c. References min. Referenced by drvconnect(), and drvdriverconnect(). |
|
Get maximum display size and number of decimal points from field type specification.
Definition at line 1054 of file sqlite3odbc.c. |
|
Return number of month days.
Definition at line 1504 of file sqlite3odbc.c. Referenced by str2date(), and str2timestamp(). |
|
Internal function to retrieve row data, used by SQLFetch() and friends and SQLGetData().
Definition at line 7161 of file sqlite3odbc.c. References stmt::bincache, stmt::bincell, stmt::bindcols, stmt::binlen, stmt::cols, freep(), getbool(), ln_strtod(), mapdeftype(), stmt::ncols, nomem(), COL::nosign, stmt::nrows, BINDCOL::offs, stmt::ov3, stmt::retr_data, stmt::rowp, stmt::rows, setstat(), SQLLEN, COL::type, xdigits, and xmalloc. Referenced by SQLGetData(). |
|
Internal locale neutral strtod function.
Definition at line 809 of file sqlite3odbc.c. Referenced by getrowdata(). |
|
Map SQL_C_DEFAULT to proper C type.
Definition at line 1113 of file sqlite3odbc.c. Referenced by getrowdata(), SQLBindCol(), SQLPutData(), and substparam(). |
|
Map SQL field type from string to ODBC integer type code.
Definition at line 957 of file sqlite3odbc.c. |
|
Reallocate space for bound columns.
Definition at line 7114 of file sqlite3odbc.c. References stmt::bindcols, BINDCOL::index, BINDCOL::lenp, BINDCOL::max, stmt::nbindcols, nomem(), BINDCOL::offs, BINDCOL::type, unbindcols(), BINDCOL::valp, xmalloc, and xrealloc. Referenced by mkresultset(), s3stmt_step(), and SQLBindCol(). |
|
Setup empty result set from constant column specification.
Definition at line 3215 of file sqlite3odbc.c. References stmt::cols, stmt::dbc, freeresult(), stmt::isselect, mkbindcols(), stmt::ncols, noconn(), stmt::nrows, stmt::rowp, s3stmt_end_if(), and dbc::sqlite. 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 8094 of file sqlite3odbc.c. References array_size, stmt::rows, stringify, and typeSpec. Referenced by drvgettypeinfo(). |
|
Report S1000 (not connected) SQL error given STMT.
Definition at line 795 of file sqlite3odbc.c. References stmt::ov3, and setstat(). Referenced by drvexecute(), drvprepare(), and mkresultset(). |
|
Report S1000 (out of memory) SQL error given STMT.
Definition at line 782 of file sqlite3odbc.c. References stmt::ov3, and setstat(). Referenced by drvbindparam(), drvcolumns(), drvgettable_row(), drvgettypeinfo(), drvprepare(), drvprimarykeys(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), drvstatistics(), drvtables(), getrowdata(), mkbindcols(), s3stmt_start(), s3stmt_step(), and substparam(). |
|
Find out column type SQLite statement pointer column number DBC pointer (for tracing only)
Definition at line 2079 of file sqlite3odbc.c. References dbc::trace. Referenced by drvprepare(), and s3stmt_step(). |
|
Stop running sqlite statement.
Definition at line 2300 of file sqlite3odbc.c. References dbc::cur_s3stmt, stmt::dbc, dbtraceapi(), and stmt::s3stmt. Referenced by drvexecute(), drvprepare(), drvsetconnectattr(), drvsetconnectoption(), s3stmt_end_if(), and SQLDisconnect(). |
|
Conditionally stop running sqlite statement.
Definition at line 2320 of file sqlite3odbc.c. References dbc::cur_s3stmt, stmt::dbc, and s3stmt_end(). Referenced by drvfreestmt(), and mkresultset(). |
|
Start sqlite statement for execution of SELECT statement.
Definition at line 2337 of file sqlite3odbc.c. References dbc::cur_s3stmt, stmt::dbc, dbtraceapi(), dbtracerc(), nomem(), stmt::ov3, stmt::query, stmt::s3stmt, dbc::s3stmt_rownum, setstat(), and dbc::sqlite. |
|
Do one sqlite statement step gathering one result row.
Definition at line 2112 of file sqlite3odbc.c. References stmt::cols, dbc::cur_s3stmt, stmt::dbc, dbtraceapi(), stmt::dcols, stmt::dyncols, fixupdyncols(), freedyncols(), stmt::longnames, mkbindcols(), stmt::ncols, nomem(), stmt::ov3, stmt::s3stmt, s3stmt_coltype(), dbc::s3stmt_rownum, setstat(), dbc::trace, xmalloc, and xstrdup. |
|
Set SQLite options (PRAGMAs) given SQLite handle.
Definition at line 904 of file sqlite3odbc.c. References busy_handler(). Referenced by dbopen(). |
|
Set error message and SQL state on statement.
Definition at line 697 of file sqlite3odbc.c. References stmt::logmsg, stmt::naterr, and stmt::sqlstate. Referenced by drvbindparam(), drvcolattribute(), drvcolattributes(), drvcolumns(), drvdescribecol(), drvexecute(), drvforeignkeys(), drvfreestmt(), drvprepare(), drvprimarykeys(), drvsetcursorname(), drvsetstmtattr(), drvsetstmtoption(), drvspecialcolumns(), drvstatistics(), drvunimplstmt(), getrowdata(), noconn(), nomem(), s3stmt_start(), s3stmt_step(), SQLBindCol(), SQLDescribeParam(), SQLGetData(), SQLNativeSql(), SQLPutData(), and substparam(). |
|
Set error message and SQL state on DBC.
Definition at line 657 of file sqlite3odbc.c. References 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 5933 of file sqlite3odbc.c. References drvallocconnect(). |
|
Allocate HENV.
Definition at line 5828 of file sqlite3odbc.c. References drvallocenv(). |
|
Allocate a HENV, HDBC, or HSTMT handle.
Definition at line 6990 of file sqlite3odbc.c. References drvallocconnect(), drvallocenv(), drvallocstmt(), ENV_MAGIC, ENV::magic, and ENV::ov3. |
|
Allocate HSTMT given HDBC.
Definition at line 6802 of file sqlite3odbc.c. References drvallocstmt(). |
|
Bind C variable to column of result set.
Definition at line 7540 of file sqlite3odbc.c. References stmt::bindcols, stmt::bkmrk, stmt::bkmrkcol, stmt::cols, BINDCOL::lenp, mapdeftype(), BINDCOL::max, mkbindcols(), BINDCOL::offs, stmt::ov3, setstat(), COL::type, BINDCOL::type, and BINDCOL::valp. |
|
Bind parameter on HSTMT.
Definition at line 3007 of file sqlite3odbc.c. References drvbindparam(). |
|
Bind parameter on HSTMT.
Definition at line 2984 of file sqlite3odbc.c. References drvbindparam(). |
|
Function not implemented.
Definition at line 2434 of file sqlite3odbc.c. References drvunimpldbc(). |
|
Function not implemented.
Definition at line 2394 of file sqlite3odbc.c. References drvunimplstmt(). |
|
Cancel HSTMT closing cursor.
Definition at line 6864 of file sqlite3odbc.c. References drvfreestmt(). |
|
Close open cursor.
Definition at line 6974 of file sqlite3odbc.c. References drvfreestmt(). |
|
Retrieve column attributes.
Definition at line 9660 of file sqlite3odbc.c. References drvcolattribute(). |
|
Retrieve column attributes.
Definition at line 9413 of file sqlite3odbc.c. References drvcolattributes(). |
|
Retrieve privileges on columns.
Definition at line 3307 of file sqlite3odbc.c. References array_size, colPrivSpec, and mkresultset(). |
|
Retrieve column information on table.
Definition at line 8052 of file sqlite3odbc.c. References drvcolumns(). |
|
Connect to SQLite database.
Definition at line 6494 of file sqlite3odbc.c. References drvconnect(). |
|
Function not implemented.
Definition at line 4372 of file sqlite3odbc.c. |
|
Function not implemented.
Definition at line 2404 of file sqlite3odbc.c. |
|
Describe column information.
Definition at line 9173 of file sqlite3odbc.c. References drvdescribecol(). |
|
Return information about parameter.
Definition at line 3082 of file sqlite3odbc.c. References stmt::nparams, stmt::ov3, and setstat(). |
|
Disconnect given HDBC.
Definition at line 6508 of file sqlite3odbc.c. References dbc::cur_s3stmt, DBC_MAGIC, dbc::dbname, dbc::dsn, freep(), dbc::intrans, dbc::magic, s3stmt_end(), setstatd(), dbc::sqlite, and dbc::trace. |
|
Connect using a driver connection string.
Definition at line 10983 of file sqlite3odbc.c. References drvdriverconnect(). |
|
Function not implemented.
Definition at line 2419 of file sqlite3odbc.c. |
|
Commit or rollback transaction.
Definition at line 4345 of file sqlite3odbc.c. References drvendtran(). |
|
Return last HDBC or HSTMT error message.
Definition at line 9782 of file sqlite3odbc.c. References drverror(). |
|
Execute query directly.
Definition at line 10313 of file sqlite3odbc.c. References drvexecute(), and drvprepare(). |
|
Execute query.
Definition at line 10299 of file sqlite3odbc.c. References drvexecute(). |
|
Fetch result row with scrolling and row status.
Definition at line 9024 of file sqlite3odbc.c. References drvfetchscroll(), stmt::row_count0, stmt::row_status, stmt::row_status0, and stmt::rowset_size. |
|
Fetch next result row.
Definition at line 8994 of file sqlite3odbc.c. References drvfetchscroll(). |
|
Fetch result row with scrolling.
Definition at line 9008 of file sqlite3odbc.c. References drvfetchscroll(). |
|
Retrieve information about primary/foreign keys.
Definition at line 4212 of file sqlite3odbc.c. References drvforeignkeys(). |
|
Free connection (HDBC).
Definition at line 6001 of file sqlite3odbc.c. References drvfreeconnect(). |
|
Free HENV.
Definition at line 5866 of file sqlite3odbc.c. References drvfreeenv(). |
|
Free a HENV, HDBC, or HSTMT handle.
Definition at line 7024 of file sqlite3odbc.c. References drvfreeconnect(), drvfreeenv(), and drvfreestmt(). |
|
Free HSTMT.
Definition at line 6852 of file sqlite3odbc.c. References drvfreestmt(). |
|
Get connect attribute of HDBC.
Definition at line 6132 of file sqlite3odbc.c. References drvgetconnectattr(). |
|
Get connect option of HDBC.
Definition at line 6292 of file sqlite3odbc.c. References drvgetconnectoption(). |
|
Get cursor name of STMT.
Definition at line 6914 of file sqlite3odbc.c. References drvgetcursorname(). |
|
Retrieve row data after fetch.
Definition at line 8685 of file sqlite3odbc.c. References stmt::bkmrk, getrowdata(), stmt::ncols, stmt::rowp, and setstat(). |
|
Function not implemented.
Definition at line 3158 of file sqlite3odbc.c. |
|
Function not implemented.
Definition at line 3182 of file sqlite3odbc.c. |
|
Function not implemented.
Definition at line 4715 of file sqlite3odbc.c. |
|
Get error message given handle (HENV, HDBC, or HSTMT).
Definition at line 4702 of file sqlite3odbc.c. References drvgetdiagrec(). |
|
Get information of HENV.
Definition at line 4514 of file sqlite3odbc.c. References ENV_MAGIC, ENV::magic, and ENV::ov3. |
|
Return information about supported ODBC API functions.
Definition at line 5654 of file sqlite3odbc.c. References array_size. |
|
Return information about what this ODBC driver supports.
Definition at line 5639 of file sqlite3odbc.c. References drvgetinfo(). |
|
Get option of HSTMT.
Definition at line 4842 of file sqlite3odbc.c. References drvgetstmtattr(). |
|
Get option of HSTMT.
Definition at line 5055 of file sqlite3odbc.c. References drvgetstmtoption(). |
|
Return data type information.
Definition at line 8390 of file sqlite3odbc.c. References drvgettypeinfo(). |
|
Return information for more result sets.
Definition at line 9797 of file sqlite3odbc.c. |
|
Translate SQL string.
Definition at line 4389 of file sqlite3odbc.c. |
|
Return number of parameters.
Definition at line 3024 of file sqlite3odbc.c. References stmt::nparams. |
|
Return number of columns of result set given HSTMT.
Definition at line 9080 of file sqlite3odbc.c. References stmt::ncols. |
|
Retrieve next parameter for sending data to executing query.
Definition at line 3048 of file sqlite3odbc.c. References stmt::bindparms, BINDPARM::need, stmt::nparams, and BINDPARM::param0. |
|
Function not implemented.
Definition at line 3148 of file sqlite3odbc.c. References drvunimplstmt(). |
|
Prepare HSTMT.
Definition at line 10287 of file sqlite3odbc.c. References drvprepare(). |
|
Retrieve information about indexed columns.
Definition at line 3551 of file sqlite3odbc.c. References drvprimarykeys(). |
|
Retrieve information about columns in result set of stored procedures.
Definition at line 4493 of file sqlite3odbc.c. References array_size, mkresultset(), and procColSpec. |
|
Retrieve information about stored procedures.
Definition at line 4444 of file sqlite3odbc.c. References array_size, mkresultset(), and procSpec. |
|
Put (partial) parameter data into executing statement.
Definition at line 2450 of file sqlite3odbc.c. References stmt::bindparms, freep(), BINDPARM::len, mapdeftype(), BINDPARM::need, stmt::nparams, BINDPARM::param, BINDPARM::parbuf, stmt::query, setstat(), BINDPARM::stype, and BINDPARM::type. |
|
Return number of affected rows of HSTMT.
Definition at line 9058 of file sqlite3odbc.c. References stmt::nrows. |
|
Set connect attribute of HDBC.
Definition at line 6190 of file sqlite3odbc.c. References drvsetconnectattr(). |
|
Set option on HDBC.
Definition at line 6339 of file sqlite3odbc.c. References drvsetconnectoption(). |
|
Set cursor name on STMT.
Definition at line 6962 of file sqlite3odbc.c. References drvsetcursorname(). |
|
Function not implemented.
Definition at line 3170 of file sqlite3odbc.c. |
|
Function not implemented.
Definition at line 3197 of file sqlite3odbc.c. |
|
Set information in HENV.
Definition at line 4561 of file sqlite3odbc.c. References ENV_MAGIC, ENV::magic, and ENV::ov3. |
|
Set information on parameter.
Definition at line 3134 of file sqlite3odbc.c. References drvbindparam(). |
|
Function not implemented.
Definition at line 5155 of file sqlite3odbc.c. References drvunimplstmt(). |
|
Function not implemented.
Definition at line 5165 of file sqlite3odbc.c. References drvunimplstmt(). |
|
Set option on HSTMT.
Definition at line 4987 of file sqlite3odbc.c. References drvsetstmtattr(). |
|
Set option on HSTMT.
Definition at line 5145 of file sqlite3odbc.c. References drvsetstmtoption(). |
|
Retrieve information about indexed columns.
Definition at line 3851 of file sqlite3odbc.c. References drvspecialcolumns(). |
|
Return statistic information on table indices.
Definition at line 8664 of file sqlite3odbc.c. References drvstatistics(). |
|
Retrieve privileges on tables and/or views.
Definition at line 3270 of file sqlite3odbc.c. References array_size, mkresultset(), and tablePrivSpec. |
|
Retrieve information on tables and/or views.
Definition at line 7851 of file sqlite3odbc.c. References drvtables(). |
|
Commit or rollback transaction.
Definition at line 4359 of file sqlite3odbc.c. References drvendtran(). |
|
Convert string to ODBC DATE_STRUCT.
Definition at line 1533 of file sqlite3odbc.c. References getmdays(), and ISDIGIT. |
|
Convert string to ODBC TIME_STRUCT.
Definition at line 1613 of file sqlite3odbc.c. References ISDIGIT. |
|
Convert string to ODBC TIMESTAMP_STRUCT.
Definition at line 1696 of file sqlite3odbc.c. References getmdays(), and ISDIGIT. |
|
Duplicate string using xmalloc().
Definition at line 330 of file sqlite3odbc.c. References xmalloc. |
|
Substitute parameter for statement.
Definition at line 2598 of file sqlite3odbc.c. References stmt::bindparms, freep(), BINDPARM::len, BINDPARM::lenp, mapdeftype(), BINDPARM::max, stmt::nbindparms, BINDPARM::need, nomem(), stmt::ov3, BINDPARM::param, BINDPARM::parbuf, setstat(), BINDPARM::strbuf, BINDPARM::stype, BINDPARM::type, xdigits, and xmalloc. |
|
Definition at line 201 of file sqlite3odbc.c. Referenced by drvtables(), and mapsqltype(). |
|
Helper function to sort type information. Callback for qsort().
Definition at line 8205 of file sqlite3odbc.c. Referenced by drvgettypeinfo(). |
|
Reset bound columns to unbound state.
Definition at line 7091 of file sqlite3odbc.c. References stmt::bindcols, stmt::bkmrkcol, BINDCOL::index, BINDCOL::lenp, BINDCOL::max, stmt::nbindcols, BINDCOL::offs, BINDCOL::type, and BINDCOL::valp. Referenced by drvfreestmt(), and mkbindcols(). |
|
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 3282 of file sqlite3odbc.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 7865 of file sqlite3odbc.c. Referenced by drvcolumns(). |
|
Definition at line 217 of file sqlite3odbc.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 3865 of file sqlite3odbc.c. Referenced by drvforeignkeys(). |
|
Initial value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "_0123456789" Definition at line 235 of file sqlite3odbc.c. |
|
Definition at line 198 of file sqlite3odbc.c. |
|
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 3320 of file sqlite3odbc.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 4456 of file sqlite3odbc.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 4420 of file sqlite3odbc.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 3564 of file sqlite3odbc.c. Referenced by drvspecialcolumns(). |
|
Definition at line 226 of file sqlite3odbc.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 8399 of file sqlite3odbc.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 3247 of file sqlite3odbc.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 7631 of file sqlite3odbc.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 8066 of file sqlite3odbc.c. Referenced by drvgettypeinfo(), and mktypeinfo(). |
|
Definition at line 197 of file sqlite3odbc.c. |
|
Definition at line 56 of file sqlite3odbc.c. Referenced by getrowdata(), and substparam(). |