Classes | Macros | Typedefs | Functions | Variables
tclsqlite3.c File Reference
#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>
Include dependency graph for tclsqlite3.c:

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 SqlFuncfindSqlFunc (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
 

Macro Definition Documentation

#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.

#define setTestUnlockNotifyVars (   x,
  y,
  z 
)

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,
 
)    TCL_VERSION

Definition at line 3460 of file tclsqlite3.c.

#define Tcl_NRAddCallback (   a,
  b,
  c,
  d,
  e,
  f 
)    (void)0

Definition at line 1698 of file tclsqlite3.c.

#define Tcl_NRCreateCommand (   a,
  b,
  c,
  d,
  e,
  f 
)    (void)0

Definition at line 1700 of file tclsqlite3.c.

#define Tcl_NREvalObj (   a,
  b,
 
)    0

Definition at line 1699 of file tclsqlite3.c.

Typedef Documentation

typedef struct DbEvalContext DbEvalContext

Definition at line 1444 of file tclsqlite3.c.

Definition at line 131 of file tclsqlite3.c.

typedef struct SqlCollate SqlCollate

Definition at line 109 of file tclsqlite3.c.

typedef struct SqlFunc SqlFunc

Definition at line 95 of file tclsqlite3.c.

typedef struct SqliteDb SqliteDb

Definition at line 89 of file tclsqlite3.c.

Definition at line 120 of file tclsqlite3.c.

typedef unsigned char u8

Definition at line 60 of file tclsqlite3.c.

Function Documentation

static int auth_callback ( void *  pArg,
int  code,
const char *  zArg1,
const char *  zArg2,
const char *  zArg3,
const char *  zArg4 
)
static

Definition at line 1026 of file tclsqlite3.c.

static void closeIncrblobChannels ( SqliteDb pDb)
static

Definition at line 201 of file tclsqlite3.c.

static int createIncrblobChannel ( Tcl_Interp *  interp,
SqliteDb pDb,
const char *  zDb,
const char *  zTable,
const char *  zColumn,
sqlite_int64  iRow,
int  isReadonly 
)
static

Definition at line 377 of file tclsqlite3.c.

static int DbBusyHandler ( void *  cd,
int  nTries 
)
static

Definition at line 568 of file tclsqlite3.c.

static int DbCommitHandler ( void *  cd)
static

Definition at line 721 of file tclsqlite3.c.

static void SQLITE_TCLAPI DbDeleteCmd ( void *  db)
static

Definition at line 511 of file tclsqlite3.c.

static Tcl_Obj* dbEvalColumnValue ( DbEvalContext p,
int  iCol 
)
static

Definition at line 1644 of file tclsqlite3.c.

static void dbEvalFinalize ( DbEvalContext p)
static

Definition at line 1625 of file tclsqlite3.c.

static void dbEvalInit ( DbEvalContext p,
SqliteDb pDb,
Tcl_Obj *  pSql,
Tcl_Obj *  pArray 
)
static

Definition at line 1483 of file tclsqlite3.c.

static int SQLITE_TCLAPI DbEvalNextCmd ( ClientData  data[],
Tcl_Interp *  interp,
int  result 
)
static

Definition at line 1708 of file tclsqlite3.c.

static void dbEvalRowInfo ( DbEvalContext p,
int *  pnCol,
Tcl_Obj ***  papColName 
)
static

Definition at line 1504 of file tclsqlite3.c.

static int dbEvalStep ( DbEvalContext p)
static

Definition at line 1562 of file tclsqlite3.c.

static void dbFreeStmt ( SqlPreparedStmt pStmt)
static

Definition at line 481 of file tclsqlite3.c.

static void DbHookCmd ( Tcl_Interp *  interp,
SqliteDb pDb,
Tcl_Obj *  pArg,
Tcl_Obj **  ppHook 
)
static

Definition at line 1774 of file tclsqlite3.c.

static int SQLITE_TCLAPI DbMain ( void *  cd,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const *  objv 
)
static

Definition at line 3292 of file tclsqlite3.c.

static int SQLITE_TCLAPI DbObjCmd ( void *  cd,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj *const *  objv 
)
static

Definition at line 1818 of file tclsqlite3.c.

static int dbPrepare ( SqliteDb pDb,
const char *  zSql,
sqlite3_stmt **  ppStmt,
const char **  pzOut 
)
static

Definition at line 1209 of file tclsqlite3.c.

static int dbPrepareAndBind ( SqliteDb pDb,
char const *  zIn,
char const **  pzOut,
SqlPreparedStmt **  ppPreStmt 
)
static

Definition at line 1238 of file tclsqlite3.c.

static void DbProfileHandler ( void *  cd,
const char *  zSql,
sqlite_uint64  tm 
)
static

Definition at line 699 of file tclsqlite3.c.

static int DbProgressHandler ( void *  cd)
static

Definition at line 585 of file tclsqlite3.c.

static void dbReleaseColumnNames ( DbEvalContext p)
static

Definition at line 1459 of file tclsqlite3.c.

static void dbReleaseStmt ( SqliteDb pDb,
SqlPreparedStmt pPreStmt,
int  discard 
)
static

Definition at line 1391 of file tclsqlite3.c.

static void DbRollbackHandler ( void *  clientData)
static

Definition at line 732 of file tclsqlite3.c.

static void DbTraceHandler ( void *  cd,
const char *  zSql 
)
static

Definition at line 604 of file tclsqlite3.c.

static int DbTraceV2Handler ( unsigned  type,
void *  cd,
void *  pd,
void *  xd 
)
static

Definition at line 624 of file tclsqlite3.c.

static int SQLITE_TCLAPI DbTransPostCmd ( ClientData  data[],
Tcl_Interp *  interp,
int  result 
)
static

Definition at line 1161 of file tclsqlite3.c.

static void DbUpdateHandler ( void *  p,
int  op,
const char *  zDb,
const char *  zTbl,
sqlite_int64  rowid 
)
static

Definition at line 833 of file tclsqlite3.c.

static int DbWalHandler ( void *  clientData,
sqlite3 db,
const char *  zDb,
int  nEntry 
)
static

Definition at line 743 of file tclsqlite3.c.

static SqlFunc* findSqlFunc ( SqliteDb pDb,
const char *  zName 
)
static

Definition at line 458 of file tclsqlite3.c.

static void flushStmtCache ( SqliteDb pDb)
static

Definition at line 494 of file tclsqlite3.c.

static int SQLITE_TCLAPI incrblobClose ( ClientData  instanceData,
Tcl_Interp *  interp 
)
static

Definition at line 219 of file tclsqlite3.c.

static int SQLITE_TCLAPI incrblobHandle ( ClientData  instanceData,
int  dir,
ClientData *  hPtr 
)
static

Definition at line 348 of file tclsqlite3.c.

static int SQLITE_TCLAPI incrblobInput ( ClientData  instanceData,
char *  buf,
int  bufSize,
int *  errorCodePtr 
)
static

Definition at line 251 of file tclsqlite3.c.

static int SQLITE_TCLAPI incrblobOutput ( ClientData  instanceData,
CONST char *  buf,
int  toWrite,
int *  errorCodePtr 
)
static

Definition at line 283 of file tclsqlite3.c.

static int SQLITE_TCLAPI incrblobSeek ( ClientData  instanceData,
long  offset,
int  seekMode,
int *  errorCodePtr 
)
static

Definition at line 316 of file tclsqlite3.c.

static void SQLITE_TCLAPI incrblobWatch ( ClientData  instanceData,
int  mode 
)
static

Definition at line 342 of file tclsqlite3.c.

static char* local_getline ( char *  zPrompt,
FILE *  in 
)
static

Definition at line 1118 of file tclsqlite3.c.

static int safeToUseEvalObjv ( Tcl_Interp *  interp,
Tcl_Obj *  pCmd 
)
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 int strlen30 ( const char *  z)
static

Definition at line 189 of file tclsqlite3.c.

static void tclCollateNeeded ( void *  pCtx,
sqlite3 db,
int  enc,
const char *  zName 
)
static

Definition at line 861 of file tclsqlite3.c.

static int tclSqlCollate ( void *  pCtx,
int  nA,
const void *  zA,
int  nB,
const void *  zB 
)
static

Definition at line 879 of file tclsqlite3.c.

static void tclSqlFunc ( sqlite3_context context,
int  argc,
sqlite3_value **  argv 
)
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.

Variable Documentation

Tcl_ChannelType IncrblobChannelType
static
Initial value:
= {
"incrblob",
TCL_CHANNEL_VERSION_2,
0,
0,
0,
0,
0,
0,
0,
}
static void SQLITE_TCLAPI incrblobWatch(ClientData instanceData, int mode)
Definition: tclsqlite3.c:342
static int SQLITE_TCLAPI incrblobInput(ClientData instanceData, char *buf, int bufSize, int *errorCodePtr)
Definition: tclsqlite3.c:251
static int SQLITE_TCLAPI incrblobOutput(ClientData instanceData, CONST char *buf, int toWrite, int *errorCodePtr)
Definition: tclsqlite3.c:283
static int SQLITE_TCLAPI incrblobClose(ClientData instanceData, Tcl_Interp *interp)
Definition: tclsqlite3.c:219
static int SQLITE_TCLAPI incrblobHandle(ClientData instanceData, int dir, ClientData *hPtr)
Definition: tclsqlite3.c:348
static int SQLITE_TCLAPI incrblobSeek(ClientData instanceData, long offset, int seekMode, int *errorCodePtr)
Definition: tclsqlite3.c:316

Definition at line 356 of file tclsqlite3.c.



asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 04:00:09