/ Check-in [7c96dadd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change sqlite* to sqlite3* in the API reference for version 3.0. Ticket #818. (CVS 1847)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7c96daddb6b857f904f0ea72d6bad21ab7dc3f16
User & Date: drh 2004-07-22 15:45:16
Context
2004-07-22
15:47
Update VERSION and changes.html in preparation for the next release. (CVS 1848) check-in: 428f8023 user: drh tags: trunk
15:45
Change sqlite* to sqlite3* in the API reference for version 3.0. Ticket #818. (CVS 1847) check-in: 7c96dadd user: drh tags: trunk
15:02
Fix bugs associated with the codec. (CVS 1846) check-in: b0a3becd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to www/capi3ref.tcl.

     1         -set rcsid {$Id: capi3ref.tcl,v 1.6 2004/07/21 14:07:58 drh Exp $}
            1  +set rcsid {$Id: capi3ref.tcl,v 1.7 2004/07/22 15:45:16 drh Exp $}
     2      2   source common.tcl
     3      3   header {C/C++ Interface For SQLite Version 3}
     4      4   puts {
     5      5   <h2>C/C++ Interface For SQLite Version 3</h2>
     6      6   }
     7      7   
     8      8   proc api {name prototype desc {notused x}} {
................................................................................
   100    100    The sqlite3_bind_*() routine must be called after
   101    101    sqlite3_prepare() or sqlite3_reset() and before sqlite3_step().
   102    102    Bindings are not reset by the sqlite3_reset() routine.
   103    103    Unbound wildcards are interpreted as NULL.
   104    104   }
   105    105   
   106    106   api {} {
   107         -  int sqlite3_busy_handler(sqlite*, int(*)(void*,int), void*);
          107  +  int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
   108    108   } {
   109    109    This routine identifies a callback function that is invoked
   110    110    whenever an attempt is made to open a database table that is
   111    111    currently locked by another process or thread.  If the busy callback
   112    112    is NULL, then sqlite3_exec() returns SQLITE_BUSY immediately if
   113    113    it finds a locked table.  If the busy callback is not NULL, then
   114    114    sqlite3_exec() invokes the callback with two arguments.  The
................................................................................
   125    125    is allowed, in theory.)  But the busy handler may not close the
   126    126    database.  Closing the database from a busy handler will delete 
   127    127    data structures out from under the executing query and will 
   128    128    probably result in a coredump.
   129    129   }
   130    130   
   131    131   api {} {
   132         -  int sqlite3_busy_timeout(sqlite*, int ms);
          132  +  int sqlite3_busy_timeout(sqlite3*, int ms);
   133    133   } {
   134    134    This routine sets a busy handler that sleeps for a while when a
   135    135    table is locked.  The handler will sleep multiple times until 
   136    136    at least "ms" milleseconds of sleeping have been done.  After
   137    137    "ms" milleseconds of sleeping, the handler returns 0 which
   138    138    causes sqlite3_exec() to return SQLITE_BUSY.
   139    139   
   140    140    Calling this routine with an argument less than or equal to zero
   141    141    turns off all busy handlers.
   142    142   }
   143    143   
   144    144   api {} {
   145         -  int sqlite3_changes(sqlite*);
          145  +  int sqlite3_changes(sqlite3*);
   146    146   } {
   147    147    This function returns the number of database rows that were changed
   148    148    (or inserted or deleted) by the most recently completed
   149    149    INSERT, UPDATE, or DELETE
   150    150    statement.  Only changes that are directly specified by the INSERT,
   151    151    UPDATE, or DELETE statement are counted.  Auxiliary changes caused by
   152    152    triggers are not counted.  Use the sqlite3_total_changes() function
................................................................................
   162    162    this optimization, the change count for "DELETE FROM table" will be
   163    163    zero regardless of the number of elements that were originally in the
   164    164    table. To get an accurate count of the number of rows deleted, use
   165    165    "DELETE FROM table WHERE 1" instead.
   166    166   }
   167    167   
   168    168   api {} {
   169         -  int sqlite3_total_changes(sqlite*);
          169  +  int sqlite3_total_changes(sqlite3*);
   170    170   } {
   171    171     This function returns the total number of database rows that have
   172    172     be modified, inserted, or deleted since the database connection was
   173    173     created using sqlite3_open().  All changes are counted, including
   174    174     changes by triggers and changes to TEMP and auxiliary databases.
   175    175     Except, changes to the SQLITE_MASTER table (caused by statements 
   176    176     such as CREATE TABLE) are not counted.  Nor are changes counted when
................................................................................
   184    184     this optimization, the change count for "DELETE FROM table" will be
   185    185     zero regardless of the number of elements that were originally in the
   186    186     table. To get an accurate count of the number of rows deleted, use
   187    187     "DELETE FROM table WHERE 1" instead.
   188    188   }
   189    189   
   190    190   api {} {
   191         -  int sqlite3_close(sqlite *);
          191  +  int sqlite3_close(sqlite3*);
   192    192   } {
   193    193     Call this function with a pointer to a structure that was previously
   194    194     returned from sqlite3_open() or sqlite3_open16()
   195    195     and the corresponding database will by closed.
   196    196   
   197    197     SQLITE_OK is returned if the close is successful.  If there are
   198    198     prepared statements that have not been finalized, then SQLITE_BUSY
................................................................................
   313    313    The first parameter is a prepared SQL statement. This function returns
   314    314    the column heading for the Nth column of that statement, where N is the
   315    315    second function parameter.  The string returned is UTF-8 for
   316    316    sqlite3_column_name() and UTF-16 for sqlite3_column_name16().
   317    317   }
   318    318   
   319    319   api {} {
   320         -void *sqlite3_commit_hook(sqlite*, int(*xCallback)(void*), void *pArg);
          320  +void *sqlite3_commit_hook(sqlite3*, int(*xCallback)(void*), void *pArg);
   321    321   } {
   322    322    <i>Experimental</i>
   323    323   
   324    324    Register a callback function to be invoked whenever a new transaction
   325    325    is committed.  The pArg argument is passed through to the callback.
   326    326    callback.  If the callback function returns non-zero, then the commit
   327    327    is converted into a rollback.
................................................................................
   529    529   
   530    530    The string "not an error" is returned when the most recent API call was
   531    531    successful.
   532    532   }
   533    533   
   534    534   api {} {
   535    535   int sqlite3_exec(
   536         -  sqlite*,                      /* An open database */
          536  +  sqlite3*,                     /* An open database */
   537    537     const char *sql,              /* SQL to be executed */
   538    538     sqlite_callback,              /* Callback function */
   539    539     void *,                       /* 1st argument to callback function */
   540    540     char **errmsg                 /* Error msg written here */
   541    541   );
   542    542   } {
   543    543    A function to executes one or more statements of SQL.
................................................................................
   605    605   } {
   606    606    Use this routine to free memory obtained from 
   607    607    sqlite3_mprintf() or sqlite3_vmprintf().
   608    608   }
   609    609   
   610    610   api {} {
   611    611   int sqlite3_get_table(
   612         -  sqlite*,               /* An open database */
          612  +  sqlite3*,              /* An open database */
   613    613     const char *sql,       /* SQL to be executed */
   614    614     char ***resultp,       /* Result written to a char *[]  that this points to */
   615    615     int *nrow,             /* Number of result rows written here */
   616    616     int *ncolumn,          /* Number of result columns written here */
   617    617     char **errmsg          /* Error msg written here */
   618    618   );
   619    619   void sqlite3_free_table(char **result);
................................................................................
   660    660    malloc() directly.  Only sqlite3_free_table() is able to release 
   661    661    the memory properly and safely.
   662    662   
   663    663    The return value of this routine is the same as from sqlite3_exec().
   664    664   }
   665    665   
   666    666   api {sqlite3_interrupt} {
   667         - void sqlite3_interrupt(sqlite*);
          667  + void sqlite3_interrupt(sqlite3*);
   668    668   } {
   669    669    This function causes any pending database operation to abort and
   670    670    return at its earliest opportunity.  This routine is typically
   671    671    called in response to a user action such as pressing "Cancel"
   672    672    or Ctrl-C where the user wants a long query operation to halt
   673    673    immediately.
   674    674   } {}
   675    675   
   676    676   api {} {
   677         -long long int sqlite3_last_insert_rowid(sqlite*);
          677  +long long int sqlite3_last_insert_rowid(sqlite3*);
   678    678   } {
   679    679    Each entry in an SQLite table has a unique integer key.  (The key is
   680    680    the value of the INTEGER PRIMARY KEY column if there is such a column,
   681    681    otherwise the key is generated at random.  The unique key is always
   682    682    available as the ROWID, OID, or _ROWID_ column.)  The following routine
   683    683    returns the integer key of the most recent insert in the database.
   684    684   
................................................................................
   803    803    set to NULL.  If the input text contained no SQL (if the input is and
   804    804    empty string or a comment) then *ppStmt is set to NULL.
   805    805   
   806    806    On success, SQLITE_OK is returned.  Otherwise an error code is returned.
   807    807   }
   808    808   
   809    809   api {} {
   810         -void sqlite3_progress_handler(sqlite*, int, int(*)(void*), void*);
          810  +void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
   811    811   } {
   812    812    <i>Experimental</i>
   813    813   
   814    814    This routine configures a callback function - the progress callback - that
   815    815    is invoked periodically during long running calls to sqlite3_exec(),
   816    816    sqlite3_step() and sqlite3_get_table().
   817    817    An example use for this API is to keep
................................................................................
   868    868    The operation of these routines is very similar to the operation of
   869    869    sqlite3_bind_blob() and its cousins.  Refer to the documentation there
   870    870    for additional information.
   871    871   }
   872    872   
   873    873   api {} {
   874    874   int sqlite3_set_authorizer(
   875         -  sqlite*,
          875  +  sqlite3*,
   876    876     int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
   877    877     void *pUserData
   878    878   );
   879    879   #define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
   880    880   #define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
   881    881   #define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
   882    882   #define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
................................................................................
   963    963    Perhaps it was called on a virtual machine that had already been
   964    964    finalized or on one that had previously returned SQLITE_ERROR or
   965    965    SQLITE_DONE.  Or it could be the case the the same database connection
   966    966    is being used simulataneously by two or more threads.
   967    967   }
   968    968   
   969    969   api {} {
   970         -void *sqlite3_trace(sqlite*, void(*xTrace)(void*,const char*), void*);
          970  +void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
   971    971   } {
   972    972    Register a function that is called at every invocation of sqlite3_exec()
   973    973    or sqlite3_prepare().  This function can be used (for example) to generate
   974    974    a log file of all SQL executed against a database.  This is frequently
   975    975    useful when debugging an application that uses SQLite.
   976    976   }
   977    977