|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| sqlite-src/ | H | 03-May-2022 | - | 170,351 | 99,300 |
| virtual/ | H | 03-May-2022 | - | 7,396 | 5,241 |
| Makefile.am | H A D | 08-Nov-2020 | 3.1 KiB | 99 | 82 |
| Makefile.in | H A D | 03-May-2022 | 83.5 KiB | 1,437 | 1,301 |
| README | H A D | 18-Mar-2019 | 2.6 KiB | 68 | 51 |
| gda-sqlite-blob-op.c | H A D | 08-Nov-2020 | 8 KiB | 325 | 240 |
| gda-sqlite-blob-op.h | H A D | 08-Nov-2020 | 2 KiB | 55 | 25 |
| gda-sqlite-ddl.c | H A D | 08-Nov-2020 | 16.3 KiB | 528 | 402 |
| gda-sqlite-ddl.h | H A D | 08-Nov-2020 | 2.3 KiB | 52 | 22 |
| gda-sqlite-handler-bin.c | H A D | 08-Nov-2020 | 8.2 KiB | 310 | 227 |
| gda-sqlite-handler-bin.h | H A D | 08-Nov-2020 | 2.1 KiB | 61 | 25 |
| gda-sqlite-handler-boolean.c | H A D | 08-Nov-2020 | 6.6 KiB | 222 | 152 |
| gda-sqlite-handler-boolean.h | H A D | 08-Nov-2020 | 2.1 KiB | 57 | 25 |
| gda-sqlite-meta.c | H A D | 08-Nov-2020 | 79.3 KiB | 2,443 | 2,023 |
| gda-sqlite-meta.h | H A D | 08-Nov-2020 | 11 KiB | 211 | 137 |
| gda-sqlite-provider.c | H A D | 08-Nov-2020 | 128.7 KiB | 4,038 | 3,346 |
| gda-sqlite-provider.h | H A D | 08-Nov-2020 | 2.1 KiB | 56 | 22 |
| gda-sqlite-pstmt.c | H A D | 08-Nov-2020 | 3 KiB | 112 | 68 |
| gda-sqlite-pstmt.h | H A D | 08-Nov-2020 | 2.2 KiB | 65 | 34 |
| gda-sqlite-recordset.c | H A D | 08-Nov-2020 | 25.4 KiB | 761 | 613 |
| gda-sqlite-recordset.h | H A D | 08-Nov-2020 | 2.5 KiB | 61 | 28 |
| gda-sqlite-util.c | H A D | 08-Nov-2020 | 8.8 KiB | 382 | 309 |
| gda-sqlite-util.h | H A D | 08-Nov-2020 | 1.8 KiB | 49 | 16 |
| gda-sqlite.h | H A D | 08-Nov-2020 | 2.1 KiB | 68 | 35 |
| gda-symbols-util.c | H A D | 08-Nov-2020 | 11.2 KiB | 298 | 251 |
| gda-symbols-util.h | H A D | 08-Nov-2020 | 5.3 KiB | 127 | 86 |
| gen_emb_string.c | H A D | 08-Nov-2020 | 5 KiB | 199 | 137 |
| keywords.list | H A D | 18-Mar-2019 | 959 | 123 | 120 |
| keywords_hash.h | H A D | 18-Mar-2019 | 1.9 KiB | 48 | 37 |
| mkkeywordhash.c | H A D | 08-Nov-2020 | 14.1 KiB | 500 | 409 |
README
1Accessing SQLite's symbols:
2===========================
3Since the addition of Oracle Berkeley DB 5's SQL provider, all the sqlite3_* symbols
4can be loaded twice during the execution of a program linked with Libgda. Therefore
5how the sqlite3_* functions are called is important, and is the reason of the SQLITE3_CALL()
6macro which _MUST_ be used everytime an sqlite3_* function is called.
7
8The shared libraries layout to avoid symbols resolution clashed is outlined in the following
9diagram (when SQLite is used from a shared library, if not, then there is no symbol clash):
10
11libgda-4.0.so --(dlopen)--> libsqlite3.so (which exports all the sqlite3_* symbols)
12 --(dlopen)--> providers/libgda-sqlite.so (which does not export any sqlite3_* symbol)
13 --(dlopen)--> providers/libgda-bdbsql.so
14 --(dlopen)--> libdb-5.0.so (which exports all the sqlite3_* symbols)
15As the libsqlite3.so and the libdb-5.0.so shared libraries are loaded using the G_MODULE_BIND_LOCAL
16flag, their exported symbols don't clash.
17
18
19Which version of SQLite is used:
20================================
21
22When embedded SQLITE is used:
23* HAVE_SQLITE is *not* defined
24* patch it to add the PRAGMA command
25* linked as static
26
27When system SQLITE is used:
28* HAVE_SQLITE is defined
29* obviously not patched for PRAGMA
30* linked as dynamic => override the sqlite3CreateFunc function
31* For WIN32 (or MacOSX) we would need to use another mechanism (see lattice.umiacs.umd.edu/files/functions_tr.pdf) => impose embedded static lib
32
33Possible solutions in the future:
341 - make SQLite implement the required PRAGMA (patch proposed)
352 - don't use the required PRAGMA at all, and manage to intercept the sqlite3CreateFunc call
36 when statically linked (=> modify the source code of SQLite)
37
38
39
40
41BLOB handling in SQLite:
42========================
43
44SQLite now supports incremental I/O for BLOBS. Any data in any column can be accessed
45with this API.
46
47When writing a blob to the database:
48------------------------------------
49Opening a blob requires the following information:
50* the database name
51* the table name
52* the column name
53* the ROWID
54
55The first 3 pieces of information can be obtained from the INSERT or UPDATE statement
56itself.
57
58The ROWID can be obtained using sqlite3_last_insert_rowid() for an INSERT or must be queried
59for an UPDATE.
60
61When reading a blob from the database:
62--------------------------------------
63Opening a blob requires the following information:
64* the database name: use sqlite3_column_database_name()
65* the table name: use sqlite3_column_table_name()
66* the column name: use sqlite3_column_origin_name()
67* the ROWID: get it from the SELECT as the last row.
68