Back to index

lightning-sunbird  0.9+nobinonly
Defines | Typedefs | Functions | Variables
sqlite3.h File Reference
#include <stdarg.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SQLITE_VERSION   "3.3.5"
#define SQLITE_VERSION_NUMBER   3003005
#define SQLITE_OK   0 /* Successful result */
#define SQLITE_ERROR   1 /* SQL error or missing database */
#define SQLITE_INTERNAL   2 /* NOT USED. Internal logic error in SQLite */
#define SQLITE_PERM   3 /* Access permission denied */
#define SQLITE_ABORT   4 /* Callback routine requested an abort */
#define SQLITE_BUSY   5 /* The database file is locked */
#define SQLITE_LOCKED   6 /* A table in the database is locked */
#define SQLITE_NOMEM   7 /* A malloc() failed */
#define SQLITE_READONLY   8 /* Attempt to write a readonly database */
#define SQLITE_INTERRUPT   9 /* Operation terminated by sqlite3_interrupt()*/
#define SQLITE_IOERR   10 /* Some kind of disk I/O error occurred */
#define SQLITE_CORRUPT   11 /* The database disk image is malformed */
#define SQLITE_NOTFOUND   12 /* NOT USED. Table or record not found */
#define SQLITE_FULL   13 /* Insertion failed because database is full */
#define SQLITE_CANTOPEN   14 /* Unable to open the database file */
#define SQLITE_PROTOCOL   15 /* Database lock protocol error */
#define SQLITE_EMPTY   16 /* Database is empty */
#define SQLITE_SCHEMA   17 /* The database schema changed */
#define SQLITE_TOOBIG   18 /* NOT USED. Too much data for one row */
#define SQLITE_CONSTRAINT   19 /* Abort due to contraint violation */
#define SQLITE_MISMATCH   20 /* Data type mismatch */
#define SQLITE_MISUSE   21 /* Library used incorrectly */
#define SQLITE_NOLFS   22 /* Uses OS features not supported on host */
#define SQLITE_AUTH   23 /* Authorization denied */
#define SQLITE_FORMAT   24 /* Auxiliary database format error */
#define SQLITE_RANGE   25 /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB   26 /* File opened that is not a database file */
#define SQLITE_ROW   100 /* sqlite3_step() has another row ready */
#define SQLITE_DONE   101 /* sqlite3_step() has finished executing */
#define SQLITE_COPY   0 /* Table Name File Name */
#define SQLITE_CREATE_INDEX   1 /* Index Name Table Name */
#define SQLITE_CREATE_TABLE   2 /* Table Name NULL */
#define SQLITE_CREATE_TEMP_INDEX   3 /* Index Name Table Name */
#define SQLITE_CREATE_TEMP_TABLE   4 /* Table Name NULL */
#define SQLITE_CREATE_TEMP_TRIGGER   5 /* Trigger Name Table Name */
#define SQLITE_CREATE_TEMP_VIEW   6 /* View Name NULL */
#define SQLITE_CREATE_TRIGGER   7 /* Trigger Name Table Name */
#define SQLITE_CREATE_VIEW   8 /* View Name NULL */
#define SQLITE_DELETE   9 /* Table Name NULL */
#define SQLITE_DROP_INDEX   10 /* Index Name Table Name */
#define SQLITE_DROP_TABLE   11 /* Table Name NULL */
#define SQLITE_DROP_TEMP_INDEX   12 /* Index Name Table Name */
#define SQLITE_DROP_TEMP_TABLE   13 /* Table Name NULL */
#define SQLITE_DROP_TEMP_TRIGGER   14 /* Trigger Name Table Name */
#define SQLITE_DROP_TEMP_VIEW   15 /* View Name NULL */
#define SQLITE_DROP_TRIGGER   16 /* Trigger Name Table Name */
#define SQLITE_DROP_VIEW   17 /* View Name NULL */
#define SQLITE_INSERT   18 /* Table Name NULL */
#define SQLITE_PRAGMA   19 /* Pragma Name 1st arg or NULL */
#define SQLITE_READ   20 /* Table Name Column Name */
#define SQLITE_SELECT   21 /* NULL NULL */
#define SQLITE_TRANSACTION   22 /* NULL NULL */
#define SQLITE_UPDATE   23 /* Table Name Column Name */
#define SQLITE_ATTACH   24 /* Filename NULL */
#define SQLITE_DETACH   25 /* Database Name NULL */
#define SQLITE_ALTER_TABLE   26 /* Database Name Table Name */
#define SQLITE_REINDEX   27 /* Index Name NULL */
#define SQLITE_ANALYZE   28 /* Table Name NULL */
#define SQLITE_DENY   1 /* Abort the SQL statement with an error */
#define SQLITE_IGNORE   2 /* Don't allow access, but don't generate an error */
#define SQLITE_INTEGER   1
#define SQLITE_FLOAT   2
#define SQLITE_BLOB   4
#define SQLITE_NULL   5
#define SQLITE_TEXT   3
#define SQLITE3_TEXT   3
#define SQLITE_STATIC   ((void(*)(void *))0)
#define SQLITE_TRANSIENT   ((void(*)(void *))-1)
#define SQLITE_UTF8   1
#define SQLITE_UTF16LE   2
#define SQLITE_UTF16BE   3
#define SQLITE_UTF16   4 /* Use native byte order */
#define SQLITE_ANY   5 /* sqlite3_create_function only */
#define SQLITE_UTF16_ALIGNED   8 /* sqlite3_create_collation only */

Typedefs

typedef struct sqlite3
typedef long long int sqlite_int64
typedef unsigned long long int sqlite_uint64
typedef int(* sqlite3_callback )(void *, int, char **, char **)
typedef struct sqlite3_stmt
typedef struct sqlite3_context
typedef struct Mem

Functions

const char * sqlite3_libversion (void)
int sqlite3_libversion_number (void)
int sqlite3_close (sqlite3 *)
int sqlite3_exec (sqlite3 *, const char *sql, sqlite3_callback, void *, char **errmsg)
sqlite_int64 sqlite3_last_insert_rowid (sqlite3 *)
int sqlite3_changes (sqlite3 *)
int sqlite3_total_changes (sqlite3 *)
void sqlite3_interrupt (sqlite3 *)
int sqlite3_complete (const char *sql)
int sqlite3_complete16 (const void *sql)
int sqlite3_busy_handler (sqlite3 *, int(*)(void *, int), void *)
int sqlite3_busy_timeout (sqlite3 *, int ms)
int sqlite3_get_table (sqlite3 *, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg)
void sqlite3_free_table (char **result)
char * sqlite3_mprintf (const char *,...)
char * sqlite3_vmprintf (const char *, va_list)
void sqlite3_free (char *z)
char * sqlite3_snprintf (int, char *, const char *,...)
int sqlite3_set_authorizer (sqlite3 *, int(*xAuth)(void *, int, const char *, const char *, const char *, const char *), void *pUserData)
voidsqlite3_trace (sqlite3 *, void(*xTrace)(void *, const char *), void *)
voidsqlite3_profile (sqlite3 *, void(*xProfile)(void *, const char *, sqlite_uint64), void *)
void sqlite3_progress_handler (sqlite3 *, int, int(*)(void *), void *)
voidsqlite3_commit_hook (sqlite3 *, int(*)(void *), void *)
int sqlite3_open (const char *filename, sqlite3 **ppDb)
int sqlite3_open16 (const void *filename, sqlite3 **ppDb)
int sqlite3_errcode (sqlite3 *db)
const char * sqlite3_errmsg (sqlite3 *)
const voidsqlite3_errmsg16 (sqlite3 *)
int sqlite3_prepare (sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail)
int sqlite3_prepare16 (sqlite3 *db, const void *zSql, int nBytes, sqlite3_stmt **ppStmt, const void **pzTail)
int sqlite3_bind_blob (sqlite3_stmt *, int, const void *, int n, void(*)(void *))
int sqlite3_bind_double (sqlite3_stmt *, int, double)
int sqlite3_bind_int (sqlite3_stmt *, int, int)
int sqlite3_bind_int64 (sqlite3_stmt *, int, sqlite_int64)
int sqlite3_bind_null (sqlite3_stmt *, int)
int sqlite3_bind_text (sqlite3_stmt *, int, const char *, int n, void(*)(void *))
int sqlite3_bind_text16 (sqlite3_stmt *, int, const void *, int, void(*)(void *))
int sqlite3_bind_value (sqlite3_stmt *, int, const sqlite3_value *)
int sqlite3_bind_parameter_count (sqlite3_stmt *)
const char * sqlite3_bind_parameter_name (sqlite3_stmt *, int)
int sqlite3_bind_parameter_index (sqlite3_stmt *, const char *zName)
int sqlite3_clear_bindings (sqlite3_stmt *)
int sqlite3_column_count (sqlite3_stmt *pStmt)
const char * sqlite3_column_name (sqlite3_stmt *, int)
const voidsqlite3_column_name16 (sqlite3_stmt *, int)
const char * sqlite3_column_database_name (sqlite3_stmt *, int)
const voidsqlite3_column_database_name16 (sqlite3_stmt *, int)
const char * sqlite3_column_table_name (sqlite3_stmt *, int)
const voidsqlite3_column_table_name16 (sqlite3_stmt *, int)
const char * sqlite3_column_origin_name (sqlite3_stmt *, int)
const voidsqlite3_column_origin_name16 (sqlite3_stmt *, int)
const char * sqlite3_column_decltype (sqlite3_stmt *, int i)
const voidsqlite3_column_decltype16 (sqlite3_stmt *, int)
int sqlite3_step (sqlite3_stmt *)
int sqlite3_data_count (sqlite3_stmt *pStmt)
const voidsqlite3_column_blob (sqlite3_stmt *, int iCol)
int sqlite3_column_bytes (sqlite3_stmt *, int iCol)
int sqlite3_column_bytes16 (sqlite3_stmt *, int iCol)
double sqlite3_column_double (sqlite3_stmt *, int iCol)
int sqlite3_column_int (sqlite3_stmt *, int iCol)
sqlite_int64 sqlite3_column_int64 (sqlite3_stmt *, int iCol)
const unsigned char * sqlite3_column_text (sqlite3_stmt *, int iCol)
const voidsqlite3_column_text16 (sqlite3_stmt *, int iCol)
int sqlite3_column_type (sqlite3_stmt *, int iCol)
int sqlite3_column_numeric_type (sqlite3_stmt *, int iCol)
int sqlite3_finalize (sqlite3_stmt *pStmt)
int sqlite3_reset (sqlite3_stmt *pStmt)
int sqlite3_create_function (sqlite3 *, const char *zFunctionName, int nArg, int eTextRep, void *, void(*xFunc)(sqlite3_context *, int, sqlite3_value **), void(*xStep)(sqlite3_context *, int, sqlite3_value **), void(*xFinal)(sqlite3_context *))
int sqlite3_create_function16 (sqlite3 *, const void *zFunctionName, int nArg, int eTextRep, void *, void(*xFunc)(sqlite3_context *, int, sqlite3_value **), void(*xStep)(sqlite3_context *, int, sqlite3_value **), void(*xFinal)(sqlite3_context *))
int sqlite3_aggregate_count (sqlite3_context *)
const voidsqlite3_value_blob (sqlite3_value *)
int sqlite3_value_bytes (sqlite3_value *)
int sqlite3_value_bytes16 (sqlite3_value *)
double sqlite3_value_double (sqlite3_value *)
int sqlite3_value_int (sqlite3_value *)
sqlite_int64 sqlite3_value_int64 (sqlite3_value *)
const unsigned char * sqlite3_value_text (sqlite3_value *)
const voidsqlite3_value_text16 (sqlite3_value *)
const voidsqlite3_value_text16le (sqlite3_value *)
const voidsqlite3_value_text16be (sqlite3_value *)
int sqlite3_value_type (sqlite3_value *)
int sqlite3_value_numeric_type (sqlite3_value *)
voidsqlite3_aggregate_context (sqlite3_context *, int nBytes)
voidsqlite3_user_data (sqlite3_context *)
voidsqlite3_get_auxdata (sqlite3_context *, int)
void sqlite3_set_auxdata (sqlite3_context *, int, void *, void(*)(void *))
void sqlite3_result_blob (sqlite3_context *, const void *, int, void(*)(void *))
void sqlite3_result_double (sqlite3_context *, double)
void sqlite3_result_error (sqlite3_context *, const char *, int)
void sqlite3_result_error16 (sqlite3_context *, const void *, int)
void sqlite3_result_int (sqlite3_context *, int)
void sqlite3_result_int64 (sqlite3_context *, sqlite_int64)
void sqlite3_result_null (sqlite3_context *)
void sqlite3_result_text (sqlite3_context *, const char *, int, void(*)(void *))
void sqlite3_result_text16 (sqlite3_context *, const void *, int, void(*)(void *))
void sqlite3_result_text16le (sqlite3_context *, const void *, int, void(*)(void *))
void sqlite3_result_text16be (sqlite3_context *, const void *, int, void(*)(void *))
void sqlite3_result_value (sqlite3_context *, sqlite3_value *)
int sqlite3_create_collation (sqlite3 *, const char *zName, int eTextRep, void *, int(*xCompare)(void *, int, const void *, int, const void *))
int sqlite3_create_collation16 (sqlite3 *, const char *zName, int eTextRep, void *, int(*xCompare)(void *, int, const void *, int, const void *))
int sqlite3_collation_needed (sqlite3 *, void *, void(*)(void *, sqlite3 *, int eTextRep, const char *))
int sqlite3_collation_needed16 (sqlite3 *, void *, void(*)(void *, sqlite3 *, int eTextRep, const void *))
int sqlite3_key (sqlite3 *db, const void *pKey, int nKey)
int sqlite3_rekey (sqlite3 *db, const void *pKey, int nKey)
int sqlite3_sleep (int)
int sqlite3_expired (sqlite3_stmt *)
int sqlite3_transfer_bindings (sqlite3_stmt *, sqlite3_stmt *)
int sqlite3_global_recover (void)
int sqlite3_get_autocommit (sqlite3 *)
sqlite3sqlite3_db_handle (sqlite3_stmt *)
voidsqlite3_update_hook (sqlite3 *, void(*)(void *, int, char const *, char const *, sqlite_int64), void *)
voidsqlite3_rollback_hook (sqlite3 *, void(*)(void *), void *)
int sqlite3_enable_shared_cache (int)
int sqlite3_release_memory (int)
void sqlite3_soft_heap_limit (int)
void sqlite3_thread_cleanup (void)
int sqlite3_table_column_metadata (sqlite3 *db, const char *zDbName, const char *zTableName, const char *zColumnName, char const **pzDataType, char const **pzCollSeq, int *pNotNull, int *pPrimaryKey, int *pAutoinc)
int sqlite3_bind_parameter_indexes (sqlite3_stmt *pStmt, const char *zName, int **pIndexes)
void sqlite3_free_parameter_indexes (int *pIndexes)
int sqlite3Preload (sqlite3 *db)

Variables

const char sqlite3_version []
char * sqlite3_temp_directory

Define Documentation

Definition at line 860 of file sqlite3.h.

#define SQLITE_ABORT   4 /* Callback routine requested an abort */

Definition at line 174 of file sqlite3.h.

#define SQLITE_ALTER_TABLE   26 /* Database Name Table Name */

Definition at line 466 of file sqlite3.h.

#define SQLITE_ANALYZE   28 /* Table Name NULL */

Definition at line 468 of file sqlite3.h.

Definition at line 1124 of file sqlite3.h.

#define SQLITE_ATTACH   24 /* Filename NULL */

Definition at line 464 of file sqlite3.h.

#define SQLITE_AUTH   23 /* Authorization denied */

Definition at line 193 of file sqlite3.h.

Definition at line 847 of file sqlite3.h.

#define SQLITE_BUSY   5 /* The database file is locked */

Definition at line 175 of file sqlite3.h.

#define SQLITE_CANTOPEN   14 /* Unable to open the database file */

Definition at line 184 of file sqlite3.h.

#define SQLITE_CONSTRAINT   19 /* Abort due to contraint violation */

Definition at line 189 of file sqlite3.h.

#define SQLITE_COPY   0 /* Table Name File Name */

Definition at line 440 of file sqlite3.h.

#define SQLITE_CORRUPT   11 /* The database disk image is malformed */

Definition at line 181 of file sqlite3.h.

#define SQLITE_CREATE_INDEX   1 /* Index Name Table Name */

Definition at line 441 of file sqlite3.h.

#define SQLITE_CREATE_TABLE   2 /* Table Name NULL */

Definition at line 442 of file sqlite3.h.

#define SQLITE_CREATE_TEMP_INDEX   3 /* Index Name Table Name */

Definition at line 443 of file sqlite3.h.

Definition at line 444 of file sqlite3.h.

Definition at line 445 of file sqlite3.h.

#define SQLITE_CREATE_TEMP_VIEW   6 /* View Name NULL */

Definition at line 446 of file sqlite3.h.

#define SQLITE_CREATE_TRIGGER   7 /* Trigger Name Table Name */

Definition at line 447 of file sqlite3.h.

#define SQLITE_CREATE_VIEW   8 /* View Name NULL */

Definition at line 448 of file sqlite3.h.

#define SQLITE_DELETE   9 /* Table Name NULL */

Definition at line 449 of file sqlite3.h.

#define SQLITE_DENY   1 /* Abort the SQL statement with an error */

Definition at line 476 of file sqlite3.h.

#define SQLITE_DETACH   25 /* Database Name NULL */

Definition at line 465 of file sqlite3.h.

#define SQLITE_DONE   101 /* sqlite3_step() has finished executing */

Definition at line 198 of file sqlite3.h.

#define SQLITE_DROP_INDEX   10 /* Index Name Table Name */

Definition at line 450 of file sqlite3.h.

#define SQLITE_DROP_TABLE   11 /* Table Name NULL */

Definition at line 451 of file sqlite3.h.

#define SQLITE_DROP_TEMP_INDEX   12 /* Index Name Table Name */

Definition at line 452 of file sqlite3.h.

#define SQLITE_DROP_TEMP_TABLE   13 /* Table Name NULL */

Definition at line 453 of file sqlite3.h.

#define SQLITE_DROP_TEMP_TRIGGER   14 /* Trigger Name Table Name */

Definition at line 454 of file sqlite3.h.

#define SQLITE_DROP_TEMP_VIEW   15 /* View Name NULL */

Definition at line 455 of file sqlite3.h.

#define SQLITE_DROP_TRIGGER   16 /* Trigger Name Table Name */

Definition at line 456 of file sqlite3.h.

#define SQLITE_DROP_VIEW   17 /* View Name NULL */

Definition at line 457 of file sqlite3.h.

#define SQLITE_EMPTY   16 /* Database is empty */

Definition at line 186 of file sqlite3.h.

#define SQLITE_ERROR   1 /* SQL error or missing database */

Definition at line 171 of file sqlite3.h.

Definition at line 845 of file sqlite3.h.

#define SQLITE_FORMAT   24 /* Auxiliary database format error */

Definition at line 194 of file sqlite3.h.

#define SQLITE_FULL   13 /* Insertion failed because database is full */

Definition at line 183 of file sqlite3.h.

#define SQLITE_IGNORE   2 /* Don't allow access, but don't generate an error */

Definition at line 477 of file sqlite3.h.

#define SQLITE_INSERT   18 /* Table Name NULL */

Definition at line 458 of file sqlite3.h.

Definition at line 844 of file sqlite3.h.

#define SQLITE_INTERNAL   2 /* NOT USED. Internal logic error in SQLite */

Definition at line 172 of file sqlite3.h.

#define SQLITE_INTERRUPT   9 /* Operation terminated by sqlite3_interrupt()*/

Definition at line 179 of file sqlite3.h.

#define SQLITE_IOERR   10 /* Some kind of disk I/O error occurred */

Definition at line 180 of file sqlite3.h.

#define SQLITE_LOCKED   6 /* A table in the database is locked */

Definition at line 176 of file sqlite3.h.

#define SQLITE_MISMATCH   20 /* Data type mismatch */

Definition at line 190 of file sqlite3.h.

#define SQLITE_MISUSE   21 /* Library used incorrectly */

Definition at line 191 of file sqlite3.h.

#define SQLITE_NOLFS   22 /* Uses OS features not supported on host */

Definition at line 192 of file sqlite3.h.

#define SQLITE_NOMEM   7 /* A malloc() failed */

Definition at line 177 of file sqlite3.h.

#define SQLITE_NOTADB   26 /* File opened that is not a database file */

Definition at line 196 of file sqlite3.h.

#define SQLITE_NOTFOUND   12 /* NOT USED. Table or record not found */

Definition at line 182 of file sqlite3.h.

Definition at line 848 of file sqlite3.h.

#define SQLITE_OK   0 /* Successful result */

Definition at line 169 of file sqlite3.h.

#define SQLITE_PERM   3 /* Access permission denied */

Definition at line 173 of file sqlite3.h.

#define SQLITE_PRAGMA   19 /* Pragma Name 1st arg or NULL */

Definition at line 459 of file sqlite3.h.

#define SQLITE_PROTOCOL   15 /* Database lock protocol error */

Definition at line 185 of file sqlite3.h.

#define SQLITE_RANGE   25 /* 2nd parameter to sqlite3_bind out of range */

Definition at line 195 of file sqlite3.h.

#define SQLITE_READ   20 /* Table Name Column Name */

Definition at line 460 of file sqlite3.h.

#define SQLITE_READONLY   8 /* Attempt to write a readonly database */

Definition at line 178 of file sqlite3.h.

#define SQLITE_REINDEX   27 /* Index Name NULL */

Definition at line 467 of file sqlite3.h.

#define SQLITE_ROW   100 /* sqlite3_step() has another row ready */

Definition at line 197 of file sqlite3.h.

#define SQLITE_SCHEMA   17 /* The database schema changed */

Definition at line 187 of file sqlite3.h.

#define SQLITE_SELECT   21 /* NULL NULL */

Definition at line 461 of file sqlite3.h.

#define SQLITE_STATIC   ((void(*)(void *))0)

Definition at line 1096 of file sqlite3.h.

Definition at line 858 of file sqlite3.h.

#define SQLITE_TOOBIG   18 /* NOT USED. Too much data for one row */

Definition at line 188 of file sqlite3.h.

Definition at line 462 of file sqlite3.h.

#define SQLITE_TRANSIENT   ((void(*)(void *))-1)

Definition at line 1097 of file sqlite3.h.

#define SQLITE_UPDATE   23 /* Table Name Column Name */

Definition at line 463 of file sqlite3.h.

#define SQLITE_UTF16   4 /* Use native byte order */

Definition at line 1123 of file sqlite3.h.

Definition at line 1125 of file sqlite3.h.

Definition at line 1122 of file sqlite3.h.

Definition at line 1121 of file sqlite3.h.

Definition at line 1120 of file sqlite3.h.

#define SQLITE_VERSION   "3.3.5"

Definition at line 34 of file sqlite3.h.

Definition at line 51 of file sqlite3.h.


Typedef Documentation

typedef struct Mem

Definition at line 650 of file sqlite3.h.

typedef struct sqlite3

Definition at line 73 of file sqlite3.h.

typedef int(* sqlite3_callback)(void *, int, char **, char **)

Definition at line 116 of file sqlite3.h.

typedef struct sqlite3_context

Definition at line 649 of file sqlite3.h.

typedef struct sqlite3_stmt

Definition at line 603 of file sqlite3.h.

Definition at line 88 of file sqlite3.h.

typedef unsigned long long int sqlite_uint64

Definition at line 89 of file sqlite3.h.


Function Documentation

Definition at line 266 of file vdbeapi.c.

                                                              {
  Mem *pMem = p->pMem;
  assert( p && p->pFunc && p->pFunc->xStep );
  if( (pMem->flags & MEM_Agg)==0 ){
    if( nByte==0 ){
      assert( pMem->flags==MEM_Null );
      pMem->z = 0;
    }else{
      pMem->flags = MEM_Agg;
      pMem->xDel = sqlite3FreeX;
      *(FuncDef**)&pMem->i = p->pFunc;
      if( nByte<=NBFS ){
        pMem->z = pMem->zShort;
        memset(pMem->z, 0, nByte);
      }else{
        pMem->z = sqliteMalloc( nByte );
      }
    }
  }
  return (void*)pMem->z;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 344 of file vdbeapi.c.

                                               {
  assert( p && p->pFunc && p->pFunc->xStep );
  return p->pMem->n;
}

Here is the caller graph for this function:

int sqlite3_bind_blob ( sqlite3_stmt ,
int  ,
const void ,
int  n,
void(*)(void *)   
)

Definition at line 663 of file vdbeapi.c.

 {
  return bindText(pStmt, i, zData, nData, xDel, 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_bind_double ( sqlite3_stmt ,
int  ,
double   
)

Definition at line 672 of file vdbeapi.c.

                                                                  {
  int rc;
  Vdbe *p = (Vdbe *)pStmt;
  rc = vdbeUnbind(p, i);
  if( rc==SQLITE_OK ){
    sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
  }
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_bind_int ( sqlite3_stmt ,
int  ,
int   
)

Definition at line 681 of file vdbeapi.c.

                                                        {
  return sqlite3_bind_int64(p, i, (i64)iValue);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 684 of file vdbeapi.c.

                                                                       {
  int rc;
  Vdbe *p = (Vdbe *)pStmt;
  rc = vdbeUnbind(p, i);
  if( rc==SQLITE_OK ){
    sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
  }
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 693 of file vdbeapi.c.

                                             {
  return vdbeUnbind((Vdbe *)p, i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 721 of file vdbeapi.c.

                                                     {
  Vdbe *p = (Vdbe*)pStmt;
  return p ? p->nVar : 0;
}

Here is the caller graph for this function:

int sqlite3_bind_parameter_index ( sqlite3_stmt ,
const char *  zName 
)

Definition at line 765 of file vdbeapi.c.

                                                                        {
  Vdbe *p = (Vdbe*)pStmt;
  int i;
  if( p==0 ){
    return 0;
  }
  createVarMap(p); 
  if( zName ){
    for(i=0; i<p->nVar; i++){
      const char *z = p->azVar[i];
      if( z && strcmp(z,zName)==0 ){
        return i+1;
      }
    }
  }
  return 0;
}

Here is the call graph for this function:

int sqlite3_bind_parameter_indexes ( sqlite3_stmt pStmt,
const char *  zName,
int **  pIndexes 
)

Definition at line 790 of file vdbeapi.c.

 {
  Vdbe *p = (Vdbe*)pStmt;
  int i, j, nVars, *indexes;
  if( p==0 ){
    return 0;
  }
  createVarMap(p);
  if( !zName )
    return 0;
  /* first count */
  nVars = 0;
  for(i=0; i<p->nVar; i++){
    const char *z = p->azVar[i];
    if( z && strcmp(z,zName)==0 ){
      nVars++;
    }
  }
  indexes = sqliteMalloc( sizeof(int) * nVars );
  j = 0;
  for(i=0; i<p->nVar; i++){
    const char *z = p->azVar[i];
    if( z && strcmp(z,zName)==0 )
      indexes[j++] = i+1;
  }
  *pIndexes = indexes;
  return nVars;
}

Here is the call graph for this function:

Definition at line 751 of file vdbeapi.c.

                                                                   {
  Vdbe *p = (Vdbe*)pStmt;
  if( p==0 || i<1 || i>p->nVar ){
    return 0;
  }
  createVarMap(p);
  return p->azVar[i-1];
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_bind_text ( sqlite3_stmt ,
int  ,
const char *  ,
int  n,
void(*)(void *)   
)

Definition at line 696 of file vdbeapi.c.

 {
  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_bind_text16 ( sqlite3_stmt ,
int  ,
const void ,
int  ,
void(*)(void *)   
)

Definition at line 706 of file vdbeapi.c.

 {
  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
}

Here is the call graph for this function:

int sqlite3_bind_value ( sqlite3_stmt ,
int  ,
const sqlite3_value *   
)
int sqlite3_busy_handler ( sqlite3 ,
int(*)(void *, int ,
void  
)

Definition at line 312 of file main.c.

 {
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }
  db->busyHandler.xFunc = xBusy;
  db->busyHandler.pArg = pArg;
  db->busyHandler.nBusy = 0;
  return SQLITE_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_busy_timeout ( sqlite3 ,
int  ms 
)

Definition at line 357 of file main.c.

                                             {
  if( ms>0 ){
    db->busyTimeout = ms;
    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
  }else{
    sqlite3_busy_handler(db, 0, 0);
  }
  return SQLITE_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 86 of file main.c.

                                {
  return db->nChange;
}

Here is the caller graph for this function:

Definition at line 23 of file experimental.c.

                                               {
  int i;
  int rc = SQLITE_OK;
  for(i=1; rc==SQLITE_OK && i<=sqlite3_bind_parameter_count(pStmt); i++){
    rc = sqlite3_bind_null(pStmt, i);
  }
  return rc;
}

Here is the call graph for this function:

Definition at line 100 of file main.c.

                              {
  HashElem *i;
  int j;

  if( !db ){
    return SQLITE_OK;
  }
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }

#ifdef SQLITE_SSE
  {
    extern void sqlite3SseCleanup(sqlite3*);
    sqlite3SseCleanup(db);
  }
#endif 

  /* If there are any outstanding VMs, return SQLITE_BUSY. */
  if( db->pVdbe ){
    sqlite3Error(db, SQLITE_BUSY, 
        "Unable to close due to unfinalised statements");
    return SQLITE_BUSY;
  }
  assert( !sqlite3SafetyCheck(db) );

  /* FIX ME: db->magic may be set to SQLITE_MAGIC_CLOSED if the database
  ** cannot be opened for some reason. So this routine needs to run in
  ** that case. But maybe there should be an extra magic value for the
  ** "failed to open" state.
  */
  if( db->magic!=SQLITE_MAGIC_CLOSED && sqlite3SafetyOn(db) ){
    /* printf("DID NOT CLOSE\n"); fflush(stdout); */
    return SQLITE_ERROR;
  }

  for(j=0; j<db->nDb; j++){
    struct Db *pDb = &db->aDb[j];
    if( pDb->pBt ){
      sqlite3BtreeClose(pDb->pBt);
      pDb->pBt = 0;
      if( j!=1 ){
        pDb->pSchema = 0;
      }
    }
  }
  sqlite3ResetInternalSchema(db, 0);
  assert( db->nDb<=2 );
  assert( db->aDb==db->aDbStatic );
  for(i=sqliteHashFirst(&db->aFunc); i; i=sqliteHashNext(i)){
    FuncDef *pFunc, *pNext;
    for(pFunc = (FuncDef*)sqliteHashData(i); pFunc; pFunc=pNext){
      pNext = pFunc->pNext;
      sqliteFree(pFunc);
    }
  }

  for(i=sqliteHashFirst(&db->aCollSeq); i; i=sqliteHashNext(i)){
    CollSeq *pColl = (CollSeq *)sqliteHashData(i);
    sqliteFree(pColl);
  }
  sqlite3HashClear(&db->aCollSeq);

  sqlite3HashClear(&db->aFunc);
  sqlite3Error(db, SQLITE_OK, 0); /* Deallocates any cached error strings. */
  if( db->pErr ){
    sqlite3ValueFree(db->pErr);
  }

  db->magic = SQLITE_MAGIC_ERROR;

  /* The temp-database schema is allocated differently from the other schema
  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).
  ** So it needs to be freed here. Todo: Why not roll the temp schema into
  ** the same sqliteMalloc() as the one that allocates the database 
  ** structure?
  */
  sqliteFree(db->aDb[1].pSchema);
  sqliteFree(db);
  sqlite3ReleaseThreadData();
  return SQLITE_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_collation_needed ( sqlite3 ,
void ,
void(*)(void *, sqlite3 *, int eTextRep, const char *)   
)

Definition at line 1013 of file main.c.

 {
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }
  db->xCollNeeded = xCollNeeded;
  db->xCollNeeded16 = 0;
  db->pCollNeededArg = pCollNeededArg;
  return SQLITE_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_collation_needed16 ( sqlite3 ,
void ,
void(*)(void *, sqlite3 *, int eTextRep, const void *)   
)

Definition at line 1032 of file main.c.

 {
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }
  db->xCollNeeded = 0;
  db->xCollNeeded16 = xCollNeeded16;
  db->pCollNeededArg = pCollNeededArg;
  return SQLITE_OK;
}

Here is the call graph for this function:

Definition at line 420 of file vdbeapi.c.

                                                           {
  const void *val;
  sqlite3MallocDisallow();
  val = sqlite3_value_blob( columnMem(pStmt,i) );
  sqlite3MallocAllow();
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 427 of file vdbeapi.c.

                                                    {
  int val = sqlite3_value_bytes( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 432 of file vdbeapi.c.

                                                      {
  int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Definition at line 352 of file vdbeapi.c.

                                             {
  Vdbe *pVm = (Vdbe *)pStmt;
  return pVm ? pVm->nResColumn : 0;
}

Here is the caller graph for this function:

Definition at line 538 of file vdbeapi.c.

                                                               {
  return columnName(
      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
}

Here is the call graph for this function:

Definition at line 543 of file vdbeapi.c.

                                                                 {
  return columnName(
      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
}

Here is the call graph for this function:

double sqlite3_column_double ( sqlite3_stmt ,
int  iCol 
)

Definition at line 437 of file vdbeapi.c.

                                                        {
  double val = sqlite3_value_double( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_column_int ( sqlite3_stmt ,
int  iCol 
)

Definition at line 442 of file vdbeapi.c.

                                                  {
  int val = sqlite3_value_int( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Definition at line 447 of file vdbeapi.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* sqlite3_column_name ( sqlite3_stmt ,
int   
)

Definition at line 523 of file vdbeapi.c.

                                                           {
  return columnName(
      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 528 of file vdbeapi.c.

                                                             {
  return columnName(
      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
}

Here is the call graph for this function:

const unsigned char* sqlite3_column_text ( sqlite3_stmt ,
int  iCol 
)

Definition at line 452 of file vdbeapi.c.

                                                                    {
  const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 463 of file vdbeapi.c.

                                                             {
  const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
  columnMallocFailure(pStmt);
  return val;
}

Here is the call graph for this function:

Definition at line 469 of file vdbeapi.c.

                                                   {
  return sqlite3_value_type( columnMem(pStmt,i) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void* sqlite3_commit_hook ( sqlite3 ,
int(*)(void *)  ,
void  
)

Definition at line 553 of file main.c.

 {
  void *pOld = db->pCommitArg;
  db->xCommitCallback = xCallback;
  db->pCommitArg = pArg;
  return pOld;
}

Here is the caller graph for this function:

int sqlite3_complete ( const char *  sql)

Definition at line 94 of file complete.c.

                                      {
  u8 state = 0;   /* Current state, using numbers defined in header comment */
  u8 token;       /* Value of the next token */

#ifndef SQLITE_OMIT_TRIGGER
  /* A complex statement machine used to detect the end of a CREATE TRIGGER
  ** statement.  This is the normal case.
  */
  static const u8 trans[7][8] = {
                     /* Token:                                                */
     /* State:       **  SEMI  WS  OTHER EXPLAIN  CREATE  TEMP  TRIGGER  END  */
     /* 0   START: */ {    0,  0,     1,      2,      3,    1,       1,   1,  },
     /* 1  NORMAL: */ {    0,  1,     1,      1,      1,    1,       1,   1,  },
     /* 2 EXPLAIN: */ {    0,  2,     1,      1,      3,    1,       1,   1,  },
     /* 3  CREATE: */ {    0,  3,     1,      1,      1,    3,       4,   1,  },
     /* 4 TRIGGER: */ {    5,  4,     4,      4,      4,    4,       4,   4,  },
     /* 5    SEMI: */ {    5,  5,     4,      4,      4,    4,       4,   6,  },
     /* 6     END: */ {    0,  6,     4,      4,      4,    4,       4,   4,  },
  };
#else
  /* If triggers are not suppored by this compile then the statement machine
  ** used to detect the end of a statement is much simplier
  */
  static const u8 trans[2][3] = {
                     /* Token:           */
     /* State:       **  SEMI  WS  OTHER */
     /* 0   START: */ {    0,  0,     1, },
     /* 1  NORMAL: */ {    0,  1,     1, },
  };
#endif /* SQLITE_OMIT_TRIGGER */

  while( *zSql ){
    switch( *zSql ){
      case ';': {  /* A semicolon */
        token = tkSEMI;
        break;
      }
      case ' ':
      case '\r':
      case '\t':
      case '\n':
      case '\f': {  /* White space is ignored */
        token = tkWS;
        break;
      }
      case '/': {   /* C-style comments */
        if( zSql[1]!='*' ){
          token = tkOTHER;
          break;
        }
        zSql += 2;
        while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }
        if( zSql[0]==0 ) return 0;
        zSql++;
        token = tkWS;
        break;
      }
      case '-': {   /* SQL-style comments from "--" to end of line */
        if( zSql[1]!='-' ){
          token = tkOTHER;
          break;
        }
        while( *zSql && *zSql!='\n' ){ zSql++; }
        if( *zSql==0 ) return state==0;
        token = tkWS;
        break;
      }
      case '[': {   /* Microsoft-style identifiers in [...] */
        zSql++;
        while( *zSql && *zSql!=']' ){ zSql++; }
        if( *zSql==0 ) return 0;
        token = tkOTHER;
        break;
      }
      case '`':     /* Grave-accent quoted symbols used by MySQL */
      case '"':     /* single- and double-quoted strings */
      case '\'': {
        int c = *zSql;
        zSql++;
        while( *zSql && *zSql!=c ){ zSql++; }
        if( *zSql==0 ) return 0;
        token = tkOTHER;
        break;
      }
      default: {
        int c;
        if( IdChar((u8)*zSql) ){
          /* Keywords and unquoted identifiers */
          int nId;
          for(nId=1; IdChar(zSql[nId]); nId++){}
#ifdef SQLITE_OMIT_TRIGGER
          token = tkOTHER;
#else
          switch( *zSql ){
            case 'c': case 'C': {
              if( nId==6 && sqlite3StrNICmp(zSql, "create", 6)==0 ){
                token = tkCREATE;
              }else{
                token = tkOTHER;
              }
              break;
            }
            case 't': case 'T': {
              if( nId==7 && sqlite3StrNICmp(zSql, "trigger", 7)==0 ){
                token = tkTRIGGER;
              }else if( nId==4 && sqlite3StrNICmp(zSql, "temp", 4)==0 ){
                token = tkTEMP;
              }else if( nId==9 && sqlite3StrNICmp(zSql, "temporary", 9)==0 ){
                token = tkTEMP;
              }else{
                token = tkOTHER;
              }
              break;
            }
            case 'e':  case 'E': {
              if( nId==3 && sqlite3StrNICmp(zSql, "end", 3)==0 ){
                token = tkEND;
              }else
#ifndef SQLITE_OMIT_EXPLAIN
              if( nId==7 && sqlite3StrNICmp(zSql, "explain", 7)==0 ){
                token = tkEXPLAIN;
              }else
#endif
              {
                token = tkOTHER;
              }
              break;
            }
            default: {
              token = tkOTHER;
              break;
            }
          }
#endif /* SQLITE_OMIT_TRIGGER */
          zSql += nId-1;
        }else{
          /* Operators and special symbols */
          token = tkOTHER;
        }
        break;
      }
    }
    state = trans[state][token];
    zSql++;
  }
  return state==0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 248 of file complete.c.

                                        {
  sqlite3_value *pVal;
  char const *zSql8;
  int rc = 0;

  pVal = sqlite3ValueNew();
  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
  if( zSql8 ){
    rc = sqlite3_complete(zSql8);
  }
  sqlite3ValueFree(pVal);
  return sqlite3ApiExit(0, rc);
}

Here is the call graph for this function:

int sqlite3_create_collation ( sqlite3 ,
const char *  zName,
int  eTextRep,
void ,
int(*)(void *, int, const void *, int, const void *)  xCompare 
)

Definition at line 973 of file main.c.

 {
  int rc;
  assert( !sqlite3MallocFailed() );
  rc = createCollation(db, zName, enc, pCtx, xCompare);
  return sqlite3ApiExit(db, rc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_create_collation16 ( sqlite3 ,
const char *  zName,
int  eTextRep,
void ,
int(*)(void *, int, const void *, int, const void *)  xCompare 
)

Definition at line 990 of file main.c.

 {
  int rc = SQLITE_OK;
  char *zName8; 
  assert( !sqlite3MallocFailed() );
  zName8 = sqlite3utf16to8(zName, -1);
  if( zName8 ){
    rc = createCollation(db, zName8, enc, pCtx, xCompare);
    sqliteFree(zName8);
  }
  return sqlite3ApiExit(db, rc);
}

Here is the call graph for this function:

int sqlite3_create_function ( sqlite3 ,
const char *  zFunctionName,
int  nArg,
int  eTextRep,
void ,
void(*)(sqlite3_context *, int, sqlite3_value **)  xFunc,
void(*)(sqlite3_context *, int, sqlite3_value **)  xStep,
void(*)(sqlite3_context *)  xFinal 
)

Definition at line 472 of file main.c.

 {
  int rc;
  assert( !sqlite3MallocFailed() );
  rc = sqlite3CreateFunc(db, zFunctionName, nArg, enc, p, xFunc, xStep, xFinal);

  return sqlite3ApiExit(db, rc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_create_function16 ( sqlite3 ,
const void zFunctionName,
int  nArg,
int  eTextRep,
void ,
void(*)(sqlite3_context *, int, sqlite3_value **)  xFunc,
void(*)(sqlite3_context *, int, sqlite3_value **)  xStep,
void(*)(sqlite3_context *)  xFinal 
)

Definition at line 490 of file main.c.

 {
  int rc;
  char *zFunc8;
  assert( !sqlite3MallocFailed() );

  zFunc8 = sqlite3utf16to8(zFunctionName, -1);
  rc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xFunc, xStep, xFinal);
  sqliteFree(zFunc8);

  return sqlite3ApiExit(db, rc);
}

Here is the call graph for this function:

Definition at line 361 of file vdbeapi.c.

                                           {
  Vdbe *pVm = (Vdbe *)pStmt;
  if( pVm==0 || !pVm->resOnStack ) return 0;
  return pVm->nResColumn;
}

Here is the caller graph for this function:

Definition at line 857 of file vdbeapi.c.

                                               {
  return pStmt ? ((Vdbe*)pStmt)->db : 0;
}

Definition at line 1089 of file main.c.

                                           {
  ThreadData *pTd = sqlite3ThreadData();
  if( pTd ){
    /* It is only legal to call sqlite3_enable_shared_cache() when there
    ** are no currently open b-trees that were opened by the calling thread.
    ** This condition is only easy to detect if the shared-cache were 
    ** previously enabled (and is being disabled). 
    */
    if( pTd->pBtree && !enable ){
      assert( pTd->useSharedData );
      return SQLITE_MISUSE;
    }

    pTd->useSharedData = enable;
    sqlite3ReleaseThreadData();
  }
  return sqlite3ApiExit(0, SQLITE_OK);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 727 of file main.c.

                                {
  if( !db || sqlite3MallocFailed() ){
    return SQLITE_NOMEM;
  }
  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }
  return db->errCode;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* sqlite3_errmsg ( sqlite3 )

Definition at line 665 of file main.c.

                                       {
  const char *z;
  if( !db || sqlite3MallocFailed() ){
    return sqlite3ErrStr(SQLITE_NOMEM);
  }
  if( sqlite3SafetyCheck(db) || db->errCode==SQLITE_MISUSE ){
    return sqlite3ErrStr(SQLITE_MISUSE);
  }
  z = (char*)sqlite3_value_text(db->pErr);
  if( z==0 ){
    z = sqlite3ErrStr(db->errCode);
  }
  return z;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 685 of file main.c.

                                         {
  /* Because all the characters in the string are in the unicode
  ** range 0x00-0xFF, if we pad the big-endian string with a 
  ** zero byte, we can obtain the little-endian string with
  ** &big_endian[1].
  */
  static const char outOfMemBe[] = {
    0, 'o', 0, 'u', 0, 't', 0, ' ', 
    0, 'o', 0, 'f', 0, ' ', 
    0, 'm', 0, 'e', 0, 'm', 0, 'o', 0, 'r', 0, 'y', 0, 0, 0
  };
  static const char misuseBe [] = {
    0, 'l', 0, 'i', 0, 'b', 0, 'r', 0, 'a', 0, 'r', 0, 'y', 0, ' ', 
    0, 'r', 0, 'o', 0, 'u', 0, 't', 0, 'i', 0, 'n', 0, 'e', 0, ' ', 
    0, 'c', 0, 'a', 0, 'l', 0, 'l', 0, 'e', 0, 'd', 0, ' ', 
    0, 'o', 0, 'u', 0, 't', 0, ' ', 
    0, 'o', 0, 'f', 0, ' ', 
    0, 's', 0, 'e', 0, 'q', 0, 'u', 0, 'e', 0, 'n', 0, 'c', 0, 'e', 0, 0, 0
  };

  const void *z;
  if( sqlite3MallocFailed() ){
    return (void *)(&outOfMemBe[SQLITE_UTF16NATIVE==SQLITE_UTF16LE?1:0]);
  }
  if( sqlite3SafetyCheck(db) || db->errCode==SQLITE_MISUSE ){
    return (void *)(&misuseBe[SQLITE_UTF16NATIVE==SQLITE_UTF16LE?1:0]);
  }
  z = sqlite3_value_text16(db->pErr);
  if( z==0 ){
    sqlite3ValueSetStr(db->pErr, -1, sqlite3ErrStr(db->errCode),
         SQLITE_UTF8, SQLITE_STATIC);
    z = sqlite3_value_text16(db->pErr);
  }
  sqlite3ApiExit(0, 0);
  return z;
}

Here is the call graph for this function:

int sqlite3_exec ( sqlite3 ,
const char *  sql,
sqlite3_callback  ,
void ,
char **  errmsg 
)

Definition at line 34 of file legacy.c.

 {
  int rc = SQLITE_OK;
  const char *zLeftover;
  sqlite3_stmt *pStmt = 0;
  char **azCols = 0;

  int nRetry = 0;
  int nChange = 0;
  int nCallback;

  if( zSql==0 ) return SQLITE_OK;
  while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){
    int nCol;
    char **azVals = 0;

    pStmt = 0;
    rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover);
    assert( rc==SQLITE_OK || pStmt==0 );
    if( rc!=SQLITE_OK ){
      continue;
    }
    if( !pStmt ){
      /* this happens for a comment or white-space */
      zSql = zLeftover;
      continue;
    }

    db->nChange += nChange;
    nCallback = 0;

    nCol = sqlite3_column_count(pStmt);
    azCols = sqliteMalloc(2*nCol*sizeof(const char *) + 1);
    if( azCols==0 ){
      goto exec_out;
    }

    while( 1 ){
      int i;
      rc = sqlite3_step(pStmt);

      /* Invoke the callback function if required */
      if( xCallback && (SQLITE_ROW==rc || 
          (SQLITE_DONE==rc && !nCallback && db->flags&SQLITE_NullCallback)) ){
        if( 0==nCallback ){
          for(i=0; i<nCol; i++){
            azCols[i] = (char *)sqlite3_column_name(pStmt, i);
          }
          nCallback++;
        }
        if( rc==SQLITE_ROW ){
          azVals = &azCols[nCol];
          for(i=0; i<nCol; i++){
            azVals[i] = (char *)sqlite3_column_text(pStmt, i);
          }
        }
        if( xCallback(pArg, nCol, azVals, azCols) ){
          rc = SQLITE_ABORT;
          goto exec_out;
        }
      }

      if( rc!=SQLITE_ROW ){
        rc = sqlite3_finalize(pStmt);
        pStmt = 0;
        if( db->pVdbe==0 ){
          nChange = db->nChange;
        }
        if( rc!=SQLITE_SCHEMA ){
          nRetry = 0;
          zSql = zLeftover;
          while( isspace((unsigned char)zSql[0]) ) zSql++;
        }
        break;
      }
    }

    sqliteFree(azCols);
    azCols = 0;
  }

exec_out:
  if( pStmt ) sqlite3_finalize(pStmt);
  if( azCols ) sqliteFree(azCols);

  rc = sqlite3ApiExit(0, rc);
  if( rc!=SQLITE_OK && rc==sqlite3_errcode(db) && pzErrMsg ){
    *pzErrMsg = malloc(1+strlen(sqlite3_errmsg(db)));
    if( *pzErrMsg ){
      strcpy(*pzErrMsg, sqlite3_errmsg(db));
    }
  }else if( pzErrMsg ){
    *pzErrMsg = 0;
  }

  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 28 of file vdbeapi.c.

                                        {
  Vdbe *p = (Vdbe*)pStmt;
  return p==0 || p->expired;
}

Here is the caller graph for this function:

Definition at line 941 of file main.c.

                                         {
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    rc = sqlite3VdbeFinalize((Vdbe*)pStmt);
  }
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_free ( char *  z)

Definition at line 384 of file main.c.

{ free(p); }

Here is the caller graph for this function:

Definition at line 822 of file vdbeapi.c.

{
  sqliteFree( pIndexes );
}
void sqlite3_free_table ( char **  result)

Definition at line 187 of file table.c.

 {
  if( azResult ){
    int i, n;
    azResult--;
    if( azResult==0 ) return;
    n = (int)azResult[0];
    for(i=1; i<n; i++){ if( azResult[i] ) free(azResult[i]); }
    free(azResult);
  }
}

Here is the caller graph for this function:

Definition at line 1065 of file main.c.

                                       {
  return db->autoCommit;
}

Here is the caller graph for this function:

Definition at line 292 of file vdbeapi.c.

                                                          {
  VdbeFunc *pVdbeFunc = pCtx->pVdbeFunc;
  if( !pVdbeFunc || iArg>=pVdbeFunc->nAux || iArg<0 ){
    return 0;
  }
  return pVdbeFunc->apAux[iArg].pAux;
}
int sqlite3_get_table ( sqlite3 ,
const char *  sql,
char ***  resultp,
int nrow,
int ncolumn,
char **  errmsg 
)

Definition at line 122 of file table.c.

 {
  int rc;
  TabResult res;
  if( pazResult==0 ){ return SQLITE_ERROR; }
  *pazResult = 0;
  if( pnColumn ) *pnColumn = 0;
  if( pnRow ) *pnRow = 0;
  res.zErrMsg = 0;
  res.nResult = 0;
  res.nRow = 0;
  res.nColumn = 0;
  res.nData = 1;
  res.nAlloc = 20;
  res.rc = SQLITE_OK;
  res.azResult = malloc( sizeof(char*)*res.nAlloc );
  if( res.azResult==0 ) return SQLITE_NOMEM;
  res.azResult[0] = 0;
  rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
  if( res.azResult ){
    assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
    res.azResult[0] = (char*)res.nData;
  }
  if( rc==SQLITE_ABORT ){
    sqlite3_free_table(&res.azResult[1]);
    if( res.zErrMsg ){
      if( pzErrMsg ){
        free(*pzErrMsg);
        *pzErrMsg = sqlite3_mprintf("%s",res.zErrMsg);
      }
      sqliteFree(res.zErrMsg);
    }
    db->errCode = res.rc;
    return res.rc;
  }
  sqliteFree(res.zErrMsg);
  if( rc!=SQLITE_OK ){
    sqlite3_free_table(&res.azResult[1]);
    return rc;
  }
  if( res.nAlloc>res.nData ){
    char **azNew;
    azNew = realloc( res.azResult, sizeof(char*)*(res.nData+1) );
    if( azNew==0 ){
      sqlite3_free_table(&res.azResult[1]);
      return SQLITE_NOMEM;
    }
    res.nAlloc = res.nData+1;
    res.azResult = azNew;
  }
  *pazResult = &res.azResult[1];
  if( pnColumn ) *pnColumn = res.nColumn;
  if( pnRow ) *pnRow = res.nRow;
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1052 of file main.c.

                            {
  return SQLITE_OK;
}

Definition at line 370 of file main.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_key ( sqlite3 db,
const void pKey,
int  nKey 
)

Here is the caller graph for this function:

Definition at line 79 of file main.c.

                                                   {
  return db->lastRowid;
}

Here is the caller graph for this function:

Definition at line 33 of file main.c.

{ return sqlite3_version; }

Here is the caller graph for this function:

Definition at line 34 of file main.c.

char* sqlite3_mprintf ( const char *  ,
  ... 
)

Definition at line 809 of file printf.c.

                                               {
  va_list ap;
  char *z;
  char zBuf[200];

  va_start(ap,zFormat);
  z = base_vprintf((void*(*)(void*,int))realloc, 0, 
                   zBuf, sizeof(zBuf), zFormat, ap);
  va_end(ap);
  return z;

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_open ( const char *  filename,
sqlite3 **  ppDb 
)

Definition at line 891 of file main.c.

 {
  return openDatabase(zFilename, ppDb);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_open16 ( const void filename,
sqlite3 **  ppDb 
)

Definition at line 902 of file main.c.

 {
  char const *zFilename8;   /* zFilename encoded in UTF-8 instead of UTF-16 */
  int rc = SQLITE_OK;
  sqlite3_value *pVal;

  assert( zFilename );
  assert( ppDb );
  *ppDb = 0;
  pVal = sqlite3ValueNew();
  sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);
  zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);
  if( zFilename8 ){
    rc = openDatabase(zFilename8, ppDb);
    if( rc==SQLITE_OK && *ppDb ){
      rc = sqlite3_exec(*ppDb, "PRAGMA encoding = 'UTF-16'", 0, 0, 0);
      if( rc!=SQLITE_OK ){
        sqlite3_close(*ppDb);
        *ppDb = 0;
      }
    }
  }
  sqlite3ValueFree(pVal);

  return sqlite3ApiExit(0, rc);
}

Here is the call graph for this function:

int sqlite3_prepare ( sqlite3 db,
const char *  zSql,
int  nBytes,
sqlite3_stmt **  ppStmt,
const char **  pzTail 
)

Definition at line 447 of file prepare.c.

 {
  Parse sParse;
  char *zErrMsg = 0;
  int rc = SQLITE_OK;
  int i;

  /* Assert that malloc() has not failed */
  assert( !sqlite3MallocFailed() );

  assert( ppStmt );
  *ppStmt = 0;
  if( sqlite3SafetyOn(db) ){
    return SQLITE_MISUSE;
  }

  /* If any attached database schemas are locked, do not proceed with
  ** compilation. Instead return SQLITE_LOCKED immediately.
  */
  for(i=0; i<db->nDb; i++) {
    Btree *pBt = db->aDb[i].pBt;
    if( pBt && sqlite3BtreeSchemaLocked(pBt) ){
      const char *zDb = db->aDb[i].zName;
      sqlite3Error(db, SQLITE_LOCKED, "database schema is locked: %s", zDb);
      sqlite3SafetyOff(db);
      return SQLITE_LOCKED;
    }
  }
  
  memset(&sParse, 0, sizeof(sParse));
  sParse.db = db;
  if( nBytes>=0 && zSql[nBytes]!=0 ){
    char *zSqlCopy = sqlite3StrNDup(zSql, nBytes);
    sqlite3RunParser(&sParse, zSqlCopy, &zErrMsg);
    sParse.zTail += zSql - zSqlCopy;
    sqliteFree(zSqlCopy);
  }else{
    sqlite3RunParser(&sParse, zSql, &zErrMsg);
  }

  if( sqlite3MallocFailed() ){
    sParse.rc = SQLITE_NOMEM;
  }
  if( sParse.rc==SQLITE_DONE ) sParse.rc = SQLITE_OK;
  if( sParse.checkSchema && !schemaIsValid(db) ){
    sParse.rc = SQLITE_SCHEMA;
  }
  if( sParse.rc==SQLITE_SCHEMA ){
    sqlite3ResetInternalSchema(db, 0);
  }
  if( pzTail ) *pzTail = sParse.zTail;
  rc = sParse.rc;

#ifndef SQLITE_OMIT_EXPLAIN
  if( rc==SQLITE_OK && sParse.pVdbe && sParse.explain ){
    if( sParse.explain==2 ){
      sqlite3VdbeSetNumCols(sParse.pVdbe, 3);
      sqlite3VdbeSetColName(sParse.pVdbe, 0, COLNAME_NAME, "order", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 1, COLNAME_NAME, "from", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 2, COLNAME_NAME, "detail", P3_STATIC);
    }else{
      sqlite3VdbeSetNumCols(sParse.pVdbe, 5);
      sqlite3VdbeSetColName(sParse.pVdbe, 0, COLNAME_NAME, "addr", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 1, COLNAME_NAME, "opcode", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 2, COLNAME_NAME, "p1", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 3, COLNAME_NAME, "p2", P3_STATIC);
      sqlite3VdbeSetColName(sParse.pVdbe, 4, COLNAME_NAME, "p3", P3_STATIC);
    }
  } 
#endif

  if( sqlite3SafetyOff(db) ){
    rc = SQLITE_MISUSE;
  }
  if( rc==SQLITE_OK ){
    *ppStmt = (sqlite3_stmt*)sParse.pVdbe;
  }else if( sParse.pVdbe ){
    sqlite3_finalize((sqlite3_stmt*)sParse.pVdbe);
  }

  if( zErrMsg ){
    sqlite3Error(db, rc, "%s", zErrMsg);
    sqliteFree(zErrMsg);
  }else{
    sqlite3Error(db, rc, 0);
  }

  rc = sqlite3ApiExit(db, rc);
  sqlite3ReleaseThreadData();
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_prepare16 ( sqlite3 db,
const void zSql,
int  nBytes,
sqlite3_stmt **  ppStmt,
const void **  pzTail 
)

Definition at line 548 of file prepare.c.

 {
  /* This function currently works by first transforming the UTF-16
  ** encoded string to UTF-8, then invoking sqlite3_prepare(). The
  ** tricky bit is figuring out the pointer to return in *pzTail.
  */
  char *zSql8;
  const char *zTail8 = 0;
  int rc = SQLITE_OK;

  if( sqlite3SafetyCheck(db) ){
    return SQLITE_MISUSE;
  }
  zSql8 = sqlite3utf16to8(zSql, nBytes);
  if( zSql8 ){
    rc = sqlite3_prepare(db, zSql8, -1, ppStmt, &zTail8);
  }

  if( zTail8 && pzTail ){
    /* If sqlite3_prepare returns a tail pointer, we calculate the
    ** equivalent pointer into the UTF-16 string by counting the unicode
    ** characters between zSql8 and zTail8, and then returning a pointer
    ** the same number of characters into the UTF-16 string.
    */
    int chars_parsed = sqlite3utf8CharLen(zSql8, zTail8-zSql8);
    *pzTail = (u8 *)zSql + sqlite3utf16ByteLen(zSql, chars_parsed);
  }
  sqliteFree(zSql8); 
  return sqlite3ApiExit(db, rc);
}

Here is the call graph for this function:

void* sqlite3_profile ( sqlite3 ,
void(*)(void *, const char *, sqlite_uint64 xProfile,
void  
)

Definition at line 535 of file main.c.

 {
  void *pOld = db->pProfileArg;
  db->xProfile = xProfile;
  db->pProfileArg = pArg;
  return pOld;
}

Here is the caller graph for this function:

void sqlite3_progress_handler ( sqlite3 ,
int  ,
int(*)(void *)  ,
void  
)

Definition at line 332 of file main.c.

 {
  if( !sqlite3SafetyCheck(db) ){
    if( nOps>0 ){
      db->xProgress = xProgress;
      db->nProgressOps = nOps;
      db->pProgressArg = pArg;
    }else{
      db->xProgress = 0;
      db->nProgressOps = 0;
      db->pProgressArg = 0;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_rekey ( sqlite3 db,
const void pKey,
int  nKey 
)

Here is the caller graph for this function:

Definition at line 959 of file main.c.

                                      {
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    rc = sqlite3VdbeReset((Vdbe*)pStmt);
    sqlite3VdbeMakeReady((Vdbe*)pStmt, -1, 0, 0, 0);
  }
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_result_blob ( sqlite3_context ,
const void ,
int  ,
void(*)(void *)   
)

Definition at line 83 of file vdbeapi.c.

 {
  assert( n>=0 );
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, 0, xDel);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 92 of file vdbeapi.c.

                                                              {
  sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_result_error ( sqlite3_context ,
const char *  ,
int   
)

Definition at line 95 of file vdbeapi.c.

                                                                      {
  pCtx->isError = 1;
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 100 of file vdbeapi.c.

                                                                        {
  pCtx->isError = 1;
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
}

Here is the call graph for this function:

Definition at line 105 of file vdbeapi.c.

                                                        {
  sqlite3VdbeMemSetInt64(&pCtx->s, (i64)iVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 108 of file vdbeapi.c.

                                                          {
  sqlite3VdbeMemSetInt64(&pCtx->s, iVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 111 of file vdbeapi.c.

                                               {
  sqlite3VdbeMemSetNull(&pCtx->s);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_result_text ( sqlite3_context ,
const char *  ,
int  ,
void(*)(void *)   
)

Definition at line 114 of file vdbeapi.c.

 {
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, xDel);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_result_text16 ( sqlite3_context ,
const void ,
int  ,
void(*)(void *)   
)

Definition at line 123 of file vdbeapi.c.

 {
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, xDel);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 131 of file vdbeapi.c.

 {
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16BE, xDel);
}

Here is the call graph for this function:

Definition at line 139 of file vdbeapi.c.

 {
  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16LE, xDel);
}

Here is the call graph for this function:

void sqlite3_result_value ( sqlite3_context ,
sqlite3_value *   
)

Definition at line 148 of file vdbeapi.c.

                                                                       {
  sqlite3VdbeMemCopy(&pCtx->s, pValue);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void* sqlite3_rollback_hook ( sqlite3 ,
void(*)(void *)  ,
void  
)

Definition at line 583 of file main.c.

 {
  void *pRet = db->pRollbackArg;
  db->xRollbackCallback = xCallback;
  db->pRollbackArg = pArg;
  return pRet;
}

Here is the caller graph for this function:

int sqlite3_set_authorizer ( sqlite3 ,
int(*)(void *, int, const char *, const char *, const char *, const char *)  xAuth,
void pUserData 
)

Definition at line 72 of file auth.c.

 {
  db->xAuth = xAuth;
  db->pAuthArg = pArg;
  sqlite3ExpirePreparedStatements(db);
  return SQLITE_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void sqlite3_set_auxdata ( sqlite3_context ,
int  ,
void ,
void(*)(void *)   
)

Definition at line 305 of file vdbeapi.c.

 {
  struct AuxData *pAuxData;
  VdbeFunc *pVdbeFunc;
  if( iArg<0 ) return;

  pVdbeFunc = pCtx->pVdbeFunc;
  if( !pVdbeFunc || pVdbeFunc->nAux<=iArg ){
    int nMalloc = sizeof(VdbeFunc) + sizeof(struct AuxData)*iArg;
    pVdbeFunc = sqliteRealloc(pVdbeFunc, nMalloc);
    if( !pVdbeFunc ) return;
    pCtx->pVdbeFunc = pVdbeFunc;
    memset(&pVdbeFunc->apAux[pVdbeFunc->nAux], 0, 
             sizeof(struct AuxData)*(iArg+1-pVdbeFunc->nAux));
    pVdbeFunc->nAux = iArg+1;
    pVdbeFunc->pFunc = pCtx->pFunc;
  }

  pAuxData = &pVdbeFunc->apAux[iArg];
  if( pAuxData->pAux && pAuxData->xDelete ){
    pAuxData->xDelete(pAuxData->pAux);
  }
  pAuxData->pAux = pAux;
  pAuxData->xDelete = xDelete;
}

Here is the call graph for this function:

Definition at line 35 of file experimental.c.

                         {
  return sqlite3OsSleep(ms);
}

Here is the call graph for this function:

char* sqlite3_snprintf ( int  ,
char *  ,
const char *  ,
  ... 
)

Definition at line 835 of file printf.c.

                                                                   {
  char *z;
  va_list ap;

  va_start(ap,zFormat);
  z = base_vprintf(0, 0, zBuf, n, zFormat, ap);
  va_end(ap);
  return z;

Definition at line 157 of file vdbeapi.c.

                                     {
  Vdbe *p = (Vdbe*)pStmt;
  sqlite3 *db;
  int rc;

  /* Assert that malloc() has not failed */
  assert( !sqlite3MallocFailed() );

  if( p==0 || p->magic!=VDBE_MAGIC_RUN ){
    return SQLITE_MISUSE;
  }
  if( p->aborted ){
    return SQLITE_ABORT;
  }
  if( p->pc<=0 && p->expired ){
    if( p->rc==SQLITE_OK ){
      p->rc = SQLITE_SCHEMA;
    }
    return SQLITE_ERROR;
  }
  db = p->db;
  if( sqlite3SafetyOn(db) ){
    p->rc = SQLITE_MISUSE;
    return SQLITE_MISUSE;
  }
  if( p->pc<0 ){
#ifndef SQLITE_OMIT_TRACE
    /* Invoke the trace callback if there is one
    */
    if( db->xTrace && !db->init.busy ){
      assert( p->nOp>0 );
      assert( p->aOp[p->nOp-1].opcode==OP_Noop );
      assert( p->aOp[p->nOp-1].p3!=0 );
      assert( p->aOp[p->nOp-1].p3type==P3_DYNAMIC );
      sqlite3SafetyOff(db);
      db->xTrace(db->pTraceArg, p->aOp[p->nOp-1].p3);
      if( sqlite3SafetyOn(db) ){
        p->rc = SQLITE_MISUSE;
        return SQLITE_MISUSE;
      }
    }
    if( db->xProfile && !db->init.busy ){
      double rNow;
      sqlite3OsCurrentTime(&rNow);
      p->startTime = (rNow - (int)rNow)*3600.0*24.0*1000000000.0;
    }
#endif

    /* Print a copy of SQL as it is executed if the SQL_TRACE pragma is turned
    ** on in debugging mode.
    */
#ifdef SQLITE_DEBUG
    if( (db->flags & SQLITE_SqlTrace)!=0 ){
      sqlite3DebugPrintf("SQL-trace: %s\n", p->aOp[p->nOp-1].p3);
    }
#endif /* SQLITE_DEBUG */

    db->activeVdbeCnt++;
    p->pc = 0;
  }
#ifndef SQLITE_OMIT_EXPLAIN
  if( p->explain ){
    rc = sqlite3VdbeList(p);
  }else
#endif /* SQLITE_OMIT_EXPLAIN */
  {
    rc = sqlite3VdbeExec(p);
  }

  if( sqlite3SafetyOff(db) ){
    rc = SQLITE_MISUSE;
  }

#ifndef SQLITE_OMIT_TRACE
  /* Invoke the profile callback if there is one
  */
  if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy ){
    double rNow;
    u64 elapseTime;

    sqlite3OsCurrentTime(&rNow);
    elapseTime = (rNow - (int)rNow)*3600.0*24.0*1000000000.0 - p->startTime;
    assert( p->nOp>0 );
    assert( p->aOp[p->nOp-1].opcode==OP_Noop );
    assert( p->aOp[p->nOp-1].p3!=0 );
    assert( p->aOp[p->nOp-1].p3type==P3_DYNAMIC );
    db->xProfile(db->pProfileArg, p->aOp[p->nOp-1].p3, elapseTime);
  }
#endif

  sqlite3Error(p->db, rc, 0);
  p->rc = sqlite3ApiExit(p->db, p->rc);
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_table_column_metadata ( sqlite3 db,
const char *  zDbName,
const char *  zTableName,
const char *  zColumnName,
char const **  pzDataType,
char const **  pzCollSeq,
int pNotNull,
int pPrimaryKey,
int pAutoinc 
)

Definition at line 1113 of file main.c.

                                 {
  ThreadData *pTd = sqlite3OsThreadSpecificData(0);
  if( pTd ){
    memset(pTd, 0, sizeof(*pTd));
    sqlite3OsThreadSpecificData(-1);
  }
}

Here is the call graph for this function:

Definition at line 93 of file main.c.

                                      {
  return db->nTotalChange;
}

Here is the caller graph for this function:

void* sqlite3_trace ( sqlite3 ,
void(*)(void *, const char *)  xTrace,
void  
)

Definition at line 521 of file main.c.

                                                                               {
  void *pOld = db->pTraceArg;
  db->xTrace = xTrace;
  db->pTraceArg = pArg;
  return pOld;
}

Here is the caller graph for this function:

Definition at line 832 of file vdbeapi.c.

                                                                             {
  Vdbe *pFrom = (Vdbe*)pFromStmt;
  Vdbe *pTo = (Vdbe*)pToStmt;
  int i, rc = SQLITE_OK;
  if( (pFrom->magic!=VDBE_MAGIC_RUN && pFrom->magic!=VDBE_MAGIC_HALT)
    || (pTo->magic!=VDBE_MAGIC_RUN && pTo->magic!=VDBE_MAGIC_HALT) ){
    return SQLITE_MISUSE;
  }
  if( pFrom->nVar!=pTo->nVar ){
    return SQLITE_ERROR;
  }
  for(i=0; rc==SQLITE_OK && i<pFrom->nVar; i++){
    sqlite3MallocDisallow();
    rc = sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
    sqlite3MallocAllow();
  }
  return rc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void* sqlite3_update_hook ( sqlite3 ,
void(*)(void *, int, char const *, char const *, sqlite_int64 ,
void  
)

Definition at line 568 of file main.c.

 {
  void *pRet = db->pUpdateArg;
  db->xUpdateCallback = xCallback;
  db->pUpdateArg = pArg;
  return pRet;
}

Here is the caller graph for this function:

Definition at line 256 of file vdbeapi.c.

                                           {
  assert( p && p->pFunc );
  return p->pFunc->pUserData;
}

Here is the caller graph for this function:

const void* sqlite3_value_blob ( sqlite3_value *  )

Definition at line 37 of file vdbeapi.c.

                                                   {
  Mem *p = (Mem*)pVal;
  if( p->flags & (MEM_Blob|MEM_Str) ){
    return p->z;
  }else{
    return sqlite3_value_text(pVal);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_value_bytes ( sqlite3_value *  )

Definition at line 45 of file vdbeapi.c.

                                            {
  return sqlite3ValueBytes(pVal, SQLITE_UTF8);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_value_bytes16 ( sqlite3_value *  )

Definition at line 48 of file vdbeapi.c.

Here is the call graph for this function:

Here is the caller graph for this function:

double sqlite3_value_double ( sqlite3_value *  )

Definition at line 51 of file vdbeapi.c.

                                                {
  return sqlite3VdbeRealValue((Mem*)pVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_value_int ( sqlite3_value *  )

Definition at line 54 of file vdbeapi.c.

                                          {
  return sqlite3VdbeIntValue((Mem*)pVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

sqlite_int64 sqlite3_value_int64 ( sqlite3_value *  )

Definition at line 57 of file vdbeapi.c.

                                                     {
  return sqlite3VdbeIntValue((Mem*)pVal);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int sqlite3_value_numeric_type ( sqlite3_value *  )

Definition at line 263 of file vdbe.c.

                                                   {
  Mem *pMem = (Mem*)pVal;
  applyNumericAffinity(pMem);
  storeTypeInfo(pMem, 0);
  return pMem->type;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const unsigned char* sqlite3_value_text ( sqlite3_value *  )

Definition at line 60 of file vdbeapi.c.

                                                            {
  return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const void* sqlite3_value_text16 ( sqlite3_value *  )

Definition at line 64 of file vdbeapi.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const void* sqlite3_value_text16be ( sqlite3_value *  )

Definition at line 67 of file vdbeapi.c.

                                                       {
  return sqlite3ValueText(pVal, SQLITE_UTF16BE);
}

Here is the call graph for this function:

const void* sqlite3_value_text16le ( sqlite3_value *  )

Definition at line 70 of file vdbeapi.c.

                                                       {
  return sqlite3ValueText(pVal, SQLITE_UTF16LE);
}

Here is the call graph for this function:

int sqlite3_value_type ( sqlite3_value *  )

Definition at line 74 of file vdbeapi.c.

                                           {
  return pVal->type;
}

Here is the caller graph for this function:

char* sqlite3_vmprintf ( const char *  ,
va_list   
)

Definition at line 823 of file printf.c.

                                                       {
  char zBuf[200];
  return base_vprintf((void*(*)(void*,int))realloc, 0,
                      zBuf, sizeof(zBuf), zFormat, ap);

Here is the call graph for this function:

Definition at line 3240 of file build.c.

{
  Pager* pPager;
  Btree* pBt;
  int rc;
  int i;
  int dbsLoaded = 0;

  for (i = 0; i < db->nDb; i ++) {
    pBt = db->aDb[i].pBt;
    if (! pBt)
      continue;
    pPager = sqlite3BtreePager(pBt);
    if (pPager) {
      rc = sqlite3pager_loadall(pPager);
      if (rc == SQLITE_OK)
        dbsLoaded ++;
    }
  }
  if (dbsLoaded == 0)
    return SQLITE_ERROR;
  return SQLITE_OK;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 847 of file os_unix.c.

Definition at line 32 of file main.c.