#include <stdio.h>
#include <stdlib.h>
#include <sqlite3.h>
Go to the source code of this file.
|  | 
| int | myvfs_init (void) | 
|  | 
| static int | callback (void *junk __attribute__((unused)), int cnt, char **vals, char **col_name) | 
|  | 
| int | main (int argc, char **argv) | 
|  | 
  
  | 
        
          | static int callback | ( | void *junk | __attribute__(unused), |  
          |  |  | int | cnt, |  
          |  |  | char ** | vals, |  
          |  |  | char ** | col_name |  
          |  | ) |  |  |  | static | 
 
Definition at line 8 of file test1.c.
   12   for (i = 0; i < cnt; ++
i) {
    14       printf(
"%s: %s\n", col_name[i], vals[i]);
    17       printf(
"%s: %s\n", col_name[i], 
"NULL");
 
 
 
      
        
          | int main | ( | int | argc, | 
        
          |  |  | char ** | argv | 
        
          |  | ) |  |  | 
      
 
Definition at line 23 of file test1.c.
   28   if (argc < 2 || argc > 3) {
    29     fprintf(
stderr, 
"usage: %s: <db-filename> [<sql-statement>]. If <sql-statement> is omitted take from stdin.\n", 
argv[0]);
    33   err = sqlite3_open_v2(
argv[1], &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 
"myvfs");
    35     fprintf(
stderr, 
"Can't open database: %s\n", sqlite3_errmsg(db));
    40     err = sqlite3_exec(db, 
argv[2], 
callback, 0, &error_msg);
    45     getline(&buf, &n, stdin);
    46     err = sqlite3_exec(db, buf, 
callback, 0, &error_msg);
    49   if (err != SQLITE_OK) {
    50     fprintf(
stderr, 
"SQL error: %s\n", error_msg);
    51     sqlite3_free(error_msg);
 
static int callback(void *junk __attribute__((unused)), int cnt, char **vals, char **col_name)
 
 
Definition at line 1748 of file myvfs.c.
 1770 #define UNIXVFS(VFSNAME, FINDER) {                        \  1801   static sqlite3_vfs aVfs[] = {
  1809   for (i = 0; i < (
sizeof(aVfs) / 
sizeof(sqlite3_vfs)); i++) {
  1810     sqlite3_vfs_register(&aVfs[i], i == 0);
 static const sqlite3_io_methods *(*const nolockIoFinder)(const char *, unixFile *p)
#define UNIXVFS(VFSNAME, FINDER)
static struct unix_syscall aSyscall[]