#include "sqlite3.c"
#include "tcl.h"
#include <errno.h>
#include "sqlite3.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <unistd.h>
Go to the source code of this file.
Classes | |
struct | DbEvalContext |
struct | IncrblobChannel |
struct | SqlCollate |
struct | SqlFunc |
struct | SqliteDb |
struct | SqlPreparedStmt |
Macros | |
#define | DbUseNre() 0 |
#define | GETPID getpid |
#define | MAX_PREPARED_STMTS 100 |
#define | NUM_PREPARED_STMTS 10 |
#define | PACKAGE_VERSION SQLITE_VERSION |
#define | setTestUnlockNotifyVars(x, y, z) |
#define | SQLITE_TCL_NRE 0 |
#define | SQLITE_TCLAPI |
#define | Tcl_InitStubs(a, b, c) TCL_VERSION |
#define | Tcl_NRAddCallback(a, b, c, d, e, f) (void)0 |
#define | Tcl_NRCreateCommand(a, b, c, d, e, f) (void)0 |
#define | Tcl_NREvalObj(a, b, c) 0 |
Typedefs | |
typedef struct DbEvalContext | DbEvalContext |
typedef struct IncrblobChannel | IncrblobChannel |
typedef struct SqlCollate | SqlCollate |
typedef struct SqlFunc | SqlFunc |
typedef struct SqliteDb | SqliteDb |
typedef struct SqlPreparedStmt | SqlPreparedStmt |
typedef unsigned char | u8 |
Functions | |
static int | auth_callback (void *pArg, int code, const char *zArg1, const char *zArg2, const char *zArg3, const char *zArg4) |
static void | closeIncrblobChannels (SqliteDb *pDb) |
static int | createIncrblobChannel (Tcl_Interp *interp, SqliteDb *pDb, const char *zDb, const char *zTable, const char *zColumn, sqlite_int64 iRow, int isReadonly) |
static int | DbBusyHandler (void *cd, int nTries) |
static int | DbCommitHandler (void *cd) |
static void SQLITE_TCLAPI | DbDeleteCmd (void *db) |
static Tcl_Obj * | dbEvalColumnValue (DbEvalContext *p, int iCol) |
static void | dbEvalFinalize (DbEvalContext *p) |
static void | dbEvalInit (DbEvalContext *p, SqliteDb *pDb, Tcl_Obj *pSql, Tcl_Obj *pArray) |
static int SQLITE_TCLAPI | DbEvalNextCmd (ClientData data[], Tcl_Interp *interp, int result) |
static void | dbEvalRowInfo (DbEvalContext *p, int *pnCol, Tcl_Obj ***papColName) |
static int | dbEvalStep (DbEvalContext *p) |
static void | dbFreeStmt (SqlPreparedStmt *pStmt) |
static void | DbHookCmd (Tcl_Interp *interp, SqliteDb *pDb, Tcl_Obj *pArg, Tcl_Obj **ppHook) |
static int SQLITE_TCLAPI | DbMain (void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) |
static int SQLITE_TCLAPI | DbObjCmd (void *cd, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) |
static int | dbPrepare (SqliteDb *pDb, const char *zSql, sqlite3_stmt **ppStmt, const char **pzOut) |
static int | dbPrepareAndBind (SqliteDb *pDb, char const *zIn, char const **pzOut, SqlPreparedStmt **ppPreStmt) |
static void | DbProfileHandler (void *cd, const char *zSql, sqlite_uint64 tm) |
static int | DbProgressHandler (void *cd) |
static void | dbReleaseColumnNames (DbEvalContext *p) |
static void | dbReleaseStmt (SqliteDb *pDb, SqlPreparedStmt *pPreStmt, int discard) |
static void | DbRollbackHandler (void *clientData) |
static void | DbTraceHandler (void *cd, const char *zSql) |
static int | DbTraceV2Handler (unsigned type, void *cd, void *pd, void *xd) |
static int SQLITE_TCLAPI | DbTransPostCmd (ClientData data[], Tcl_Interp *interp, int result) |
static void | DbUpdateHandler (void *p, int op, const char *zDb, const char *zTbl, sqlite_int64 rowid) |
static int | DbWalHandler (void *clientData, sqlite3 *db, const char *zDb, int nEntry) |
static SqlFunc * | findSqlFunc (SqliteDb *pDb, const char *zName) |
static void | flushStmtCache (SqliteDb *pDb) |
static int SQLITE_TCLAPI | incrblobClose (ClientData instanceData, Tcl_Interp *interp) |
static int SQLITE_TCLAPI | incrblobHandle (ClientData instanceData, int dir, ClientData *hPtr) |
static int SQLITE_TCLAPI | incrblobInput (ClientData instanceData, char *buf, int bufSize, int *errorCodePtr) |
static int SQLITE_TCLAPI | incrblobOutput (ClientData instanceData, CONST char *buf, int toWrite, int *errorCodePtr) |
static int SQLITE_TCLAPI | incrblobSeek (ClientData instanceData, long offset, int seekMode, int *errorCodePtr) |
static void SQLITE_TCLAPI | incrblobWatch (ClientData instanceData, int mode) |
static char * | local_getline (char *zPrompt, FILE *in) |
static int | safeToUseEvalObjv (Tcl_Interp *interp, Tcl_Obj *pCmd) |
EXTERN int | Sqlite3_Init (Tcl_Interp *interp) |
EXTERN int | Sqlite3_SafeInit (Tcl_Interp *interp) |
EXTERN int | Sqlite3_SafeUnload (Tcl_Interp *interp, int flags) |
EXTERN int | Sqlite3_Unload (Tcl_Interp *interp, int flags) |
int | Sqlite_Init (Tcl_Interp *interp) |
int | Sqlite_Unload (Tcl_Interp *interp, int flags) |
static int | strlen30 (const char *z) |
static void | tclCollateNeeded (void *pCtx, sqlite3 *db, int enc, const char *zName) |
static int | tclSqlCollate (void *pCtx, int nA, const void *zA, int nB, const void *zB) |
static void | tclSqlFunc (sqlite3_context *context, int argc, sqlite3_value **argv) |
EXTERN int | Tclsqlite3_Init (Tcl_Interp *interp) |
EXTERN int | Tclsqlite3_Unload (Tcl_Interp *interp, int flags) |
int | Tclsqlite_Init (Tcl_Interp *interp) |
int | Tclsqlite_Unload (Tcl_Interp *interp, int flags) |
Variables | |
static Tcl_ChannelType | IncrblobChannelType |
#define DbUseNre | ( | ) | 0 |
Definition at line 1697 of file tclsqlite3.c.
#define GETPID getpid |
Definition at line 67 of file tclsqlite3.c.
#define MAX_PREPARED_STMTS 100 |
Definition at line 86 of file tclsqlite3.c.
#define NUM_PREPARED_STMTS 10 |
Definition at line 85 of file tclsqlite3.c.
#define PACKAGE_VERSION SQLITE_VERSION |
Definition at line 3469 of file tclsqlite3.c.
Definition at line 779 of file tclsqlite3.c.
#define SQLITE_TCL_NRE 0 |
Definition at line 1696 of file tclsqlite3.c.
#define SQLITE_TCLAPI |
Definition at line 46 of file tclsqlite3.c.
#define Tcl_InitStubs | ( | a, | |
b, | |||
c | |||
) | TCL_VERSION |
Definition at line 3460 of file tclsqlite3.c.
Definition at line 1698 of file tclsqlite3.c.
Definition at line 1700 of file tclsqlite3.c.
#define Tcl_NREvalObj | ( | a, | |
b, | |||
c | |||
) | 0 |
Definition at line 1699 of file tclsqlite3.c.
typedef struct DbEvalContext DbEvalContext |
Definition at line 1444 of file tclsqlite3.c.
typedef struct IncrblobChannel IncrblobChannel |
Definition at line 131 of file tclsqlite3.c.
typedef struct SqlCollate SqlCollate |
Definition at line 109 of file tclsqlite3.c.
Definition at line 95 of file tclsqlite3.c.
Definition at line 89 of file tclsqlite3.c.
typedef struct SqlPreparedStmt SqlPreparedStmt |
Definition at line 120 of file tclsqlite3.c.
typedef unsigned char u8 |
Definition at line 60 of file tclsqlite3.c.
|
static |
Definition at line 1026 of file tclsqlite3.c.
|
static |
Definition at line 201 of file tclsqlite3.c.
|
static |
Definition at line 377 of file tclsqlite3.c.
|
static |
Definition at line 568 of file tclsqlite3.c.
|
static |
Definition at line 721 of file tclsqlite3.c.
|
static |
Definition at line 511 of file tclsqlite3.c.
|
static |
Definition at line 1644 of file tclsqlite3.c.
|
static |
Definition at line 1625 of file tclsqlite3.c.
|
static |
Definition at line 1483 of file tclsqlite3.c.
|
static |
Definition at line 1708 of file tclsqlite3.c.
|
static |
Definition at line 1504 of file tclsqlite3.c.
|
static |
Definition at line 1562 of file tclsqlite3.c.
|
static |
Definition at line 481 of file tclsqlite3.c.
|
static |
Definition at line 1774 of file tclsqlite3.c.
|
static |
Definition at line 3292 of file tclsqlite3.c.
|
static |
Definition at line 1818 of file tclsqlite3.c.
|
static |
Definition at line 1209 of file tclsqlite3.c.
|
static |
Definition at line 1238 of file tclsqlite3.c.
|
static |
Definition at line 699 of file tclsqlite3.c.
|
static |
Definition at line 585 of file tclsqlite3.c.
|
static |
Definition at line 1459 of file tclsqlite3.c.
|
static |
Definition at line 1391 of file tclsqlite3.c.
|
static |
Definition at line 732 of file tclsqlite3.c.
|
static |
Definition at line 604 of file tclsqlite3.c.
|
static |
Definition at line 624 of file tclsqlite3.c.
|
static |
Definition at line 1161 of file tclsqlite3.c.
|
static |
Definition at line 833 of file tclsqlite3.c.
|
static |
Definition at line 743 of file tclsqlite3.c.
Definition at line 458 of file tclsqlite3.c.
|
static |
Definition at line 494 of file tclsqlite3.c.
|
static |
Definition at line 219 of file tclsqlite3.c.
|
static |
Definition at line 348 of file tclsqlite3.c.
|
static |
Definition at line 251 of file tclsqlite3.c.
|
static |
Definition at line 283 of file tclsqlite3.c.
|
static |
Definition at line 316 of file tclsqlite3.c.
|
static |
Definition at line 342 of file tclsqlite3.c.
|
static |
Definition at line 1118 of file tclsqlite3.c.
|
static |
Definition at line 438 of file tclsqlite3.c.
EXTERN int Sqlite3_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 3483 of file tclsqlite3.c.
EXTERN int Sqlite3_SafeInit | ( | Tcl_Interp * | interp | ) |
Definition at line 3505 of file tclsqlite3.c.
EXTERN int Sqlite3_SafeUnload | ( | Tcl_Interp * | interp, |
int | flags | ||
) |
Definition at line 3506 of file tclsqlite3.c.
EXTERN int Sqlite3_Unload | ( | Tcl_Interp * | interp, |
int | flags | ||
) |
Definition at line 3498 of file tclsqlite3.c.
int Sqlite_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 3511 of file tclsqlite3.c.
int Sqlite_Unload | ( | Tcl_Interp * | interp, |
int | flags | ||
) |
Definition at line 3513 of file tclsqlite3.c.
|
static |
Definition at line 189 of file tclsqlite3.c.
|
static |
Definition at line 861 of file tclsqlite3.c.
|
static |
Definition at line 879 of file tclsqlite3.c.
|
static |
Definition at line 902 of file tclsqlite3.c.
EXTERN int Tclsqlite3_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 3497 of file tclsqlite3.c.
EXTERN int Tclsqlite3_Unload | ( | Tcl_Interp * | interp, |
int | flags | ||
) |
Definition at line 3499 of file tclsqlite3.c.
int Tclsqlite_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 3512 of file tclsqlite3.c.
int Tclsqlite_Unload | ( | Tcl_Interp * | interp, |
int | flags | ||
) |
Definition at line 3514 of file tclsqlite3.c.
|
static |
Definition at line 356 of file tclsqlite3.c.