/ Check-in [1ca385bb]
Login

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

Overview
Comment:Export the sqlite3_bind_value API to loadable extensions. (CVS 3299)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1ca385bb39514cb73f506bfbbe38aabb6b70816c
User & Date: drh 2006-06-27 00:14:28
Context
2006-06-27
01:54
Cache and reuse virtual table index information in the optimizer. Improved diagnostics for virtual table index selection. (CVS 3300) check-in: 28413cf2 user: drh tags: trunk
00:14
Export the sqlite3_bind_value API to loadable extensions. (CVS 3299) check-in: 1ca385bb user: drh tags: trunk
2006-06-26
21:35
Publish APIs sqlite3_malloc() and sqlite3_realloc() that use the OS-layer memory allocator. Convert sqlite3_free() and sqlite3_mprintf() to also use the OS-layer memory allocator. (CVS 3298) check-in: 85a66a25 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/loadext.c.

    98     98     sqlite3_bind_int64,
    99     99     sqlite3_bind_null,
   100    100     sqlite3_bind_parameter_count,
   101    101     sqlite3_bind_parameter_index,
   102    102     sqlite3_bind_parameter_name,
   103    103     sqlite3_bind_text,
   104    104     sqlite3_bind_text16,
          105  +  sqlite3_bind_value,
   105    106     sqlite3_busy_handler,
   106    107     sqlite3_busy_timeout,
   107    108     sqlite3_changes,
   108    109     sqlite3_close,
   109    110     sqlite3_collation_needed,
   110    111     sqlite3_collation_needed16,
   111    112     sqlite3_column_blob,

Changes to src/sqlite3ext.h.

    11     11   *************************************************************************
    12     12   ** This header file defines the SQLite interface for use by
    13     13   ** shared libraries that want to be imported as extensions into
    14     14   ** an SQLite instance.  Shared libraries that intend to be loaded
    15     15   ** as extensions by SQLite should #include this file instead of 
    16     16   ** sqlite3.h.
    17     17   **
    18         -** @(#) $Id: sqlite3ext.h,v 1.4 2006/06/26 21:35:45 drh Exp $
           18  +** @(#) $Id: sqlite3ext.h,v 1.5 2006/06/27 00:14:28 drh Exp $
    19     19   */
    20     20   #ifndef _SQLITE3EXT_H_
    21     21   #define _SQLITE3EXT_H_
    22     22   #include <sqlite3.h>
    23     23   
    24     24   typedef struct sqlite3_api_routines sqlite3_api_routines;
    25     25   
................................................................................
    36     36     int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
    37     37     int  (*bind_null)(sqlite3_stmt*,int);
    38     38     int  (*bind_parameter_count)(sqlite3_stmt*);
    39     39     int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
    40     40     const char * (*bind_parameter_name)(sqlite3_stmt*,int);
    41     41     int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
    42     42     int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
           43  +  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
    43     44     int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
    44     45     int  (*busy_timeout)(sqlite3*,int ms);
    45     46     int  (*changes)(sqlite3*);
    46     47     int  (*close)(sqlite3*);
    47     48     int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
    48     49     int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
    49     50     const void * (*column_blob)(sqlite3_stmt*,int iCol);
................................................................................
    81     82     int  (*enable_shared_cache)(int);
    82     83     int  (*errcode)(sqlite3*db);
    83     84     const char * (*errmsg)(sqlite3*);
    84     85     const void * (*errmsg16)(sqlite3*);
    85     86     int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
    86     87     int  (*expired)(sqlite3_stmt*);
    87     88     int  (*finalize)(sqlite3_stmt*pStmt);
    88         -  void  (*free)(char*z);
           89  +  void  (*free)(void*);
    89     90     void  (*free_table)(char**result);
    90     91     int  (*get_autocommit)(sqlite3*);
    91     92     void * (*get_auxdata)(sqlite3_context*,int);
    92     93     int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
    93     94     int  (*global_recover)(void);
    94     95     void  (*interrupt)(sqlite3*);
    95     96     sqlite_int64  (*last_insert_rowid)(sqlite3*);
................................................................................
   164    165   #define sqlite3_bind_int64             sqlite3_api->bind_int64
   165    166   #define sqlite3_bind_null              sqlite3_api->bind_null
   166    167   #define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
   167    168   #define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
   168    169   #define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
   169    170   #define sqlite3_bind_text              sqlite3_api->bind_text
   170    171   #define sqlite3_bind_text16            sqlite3_api->bind_text16
          172  +#define sqlite3_bind_value             sqlite3_api->bind_value
   171    173   #define sqlite3_busy_handler           sqlite3_api->busy_handler
   172    174   #define sqlite3_busy_timeout           sqlite3_api->busy_timeout
   173    175   #define sqlite3_changes                sqlite3_api->changes
   174    176   #define sqlite3_close                  sqlite3_api->close
   175    177   #define sqlite3_collation_needed       sqlite3_api->collation_needed
   176    178   #define sqlite3_collation_needed16     sqlite3_api->collation_needed16
   177    179   #define sqlite3_column_blob            sqlite3_api->column_blob