3 Note: this is far from being complete! The adaptor is currently a fork of
4 the PostgreSQL adaptor.
8 - check EOAttribute+SQLite:
9 -loadValueClassAndTypeUsingSQLiteType:...
11 -primaryFetchAttributes => check field name processing
12 - rewrite for exception less operation
13 - implement more methods in SQLiteChannel+Model (hard with SQLite though)
22 > select * from date_x;
24 Configure the Adaptor (below does not work yet for SQLite3!)
26 Defaults write ogo-webui-1.0a LSAdaptor SQLite3
28 Defaults write ogo-webui-1.0a LSConnectionDictionary \
29 '{ databaseName = OGo; }'
31 Defaults write ogo-webui-1.0a PKeyGeneratorDictionary \
32 "{ newKeyExpression=\"select nextval(\\'key_generator\\');\" }"
37 Setup gdltest Database
38 ======================
40 sqlite> CREATE TABLE my_table ( pkey INT PRIMARY KEY );
46 http://www.hwaci.com/sw/sqlite/c_interface.html
49 typedef struct sqlite_vm sqlite_vm;
52 sqlite *db, /* The open database */
53 const char *zSql, /* SQL statement to be compiled */
54 const char **pzTail, /* OUT: uncompiled tail of zSql */
55 sqlite_vm **ppVm, /* OUT: the virtual machine to execute zSql */
56 char **pzErrmsg /* OUT: Error message. */
60 sqlite_vm *pVm, /* The virtual machine to execute */
61 int *pN, /* OUT: Number of columns in result */
62 const char ***pazValue, /* OUT: Column data */
63 const char ***pazColName /* OUT: Column names and datatypes */
67 sqlite_vm *pVm, /* The virtual machine to be finalized */
68 char **pzErrMsg /* OUT: Error message */
77 #define SQLITE_OK 0 /* Successful result */
78 #define SQLITE_ERROR 1 /* SQL error or missing database */
79 #define SQLITE_INTERNAL 2 /* An internal logic error in SQLite */
80 #define SQLITE_PERM 3 /* Access permission denied */
81 #define SQLITE_ABORT 4 /* Callback routine requested an abort */
82 #define SQLITE_BUSY 5 /* The database file is locked */
83 #define SQLITE_LOCKED 6 /* A table in the database is locked */
84 #define SQLITE_NOMEM 7 /* A malloc() failed */
85 #define SQLITE_READONLY 8 /* Attempt to write a readonly database */
86 #define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite_interrupt() */
87 #define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */
88 #define SQLITE_CORRUPT 11 /* The database disk image is malformed */
89 #define SQLITE_NOTFOUND 12 /* (Internal Only) Table or record not found */
90 #define SQLITE_FULL 13 /* Insertion failed because database is full */
91 #define SQLITE_CANTOPEN 14 /* Unable to open the database file */
92 #define SQLITE_PROTOCOL 15 /* Database lock protocol error */
93 #define SQLITE_EMPTY 16 /* (Internal Only) Database table is empty */
94 #define SQLITE_SCHEMA 17 /* The database schema changed */
95 #define SQLITE_TOOBIG 18 /* Too much data for one row of a table */
96 #define SQLITE_CONSTRAINT 19 /* Abort due to contraint violation */
97 #define SQLITE_MISMATCH 20 /* Data type mismatch */
98 #define SQLITE_MISUSE 21 /* Library used incorrectly */
99 #define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
100 #define SQLITE_AUTH 23 /* Authorization denied */
101 #define SQLITE_ROW 100 /* sqlite_step() has another row ready */
102 #define SQLITE_DONE 101 /* sqlite_step() has finished executing */