• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

sqlite-src/H03-May-2022-170,35199,300

virtual/H03-May-2022-7,3965,241

Makefile.amH A D08-Nov-20203.1 KiB9982

Makefile.inH A D03-May-202283.5 KiB1,4371,301

READMEH A D18-Mar-20192.6 KiB6851

gda-sqlite-blob-op.cH A D08-Nov-20208 KiB325240

gda-sqlite-blob-op.hH A D08-Nov-20202 KiB5525

gda-sqlite-ddl.cH A D08-Nov-202016.3 KiB528402

gda-sqlite-ddl.hH A D08-Nov-20202.3 KiB5222

gda-sqlite-handler-bin.cH A D08-Nov-20208.2 KiB310227

gda-sqlite-handler-bin.hH A D08-Nov-20202.1 KiB6125

gda-sqlite-handler-boolean.cH A D08-Nov-20206.6 KiB222152

gda-sqlite-handler-boolean.hH A D08-Nov-20202.1 KiB5725

gda-sqlite-meta.cH A D08-Nov-202079.3 KiB2,4432,023

gda-sqlite-meta.hH A D08-Nov-202011 KiB211137

gda-sqlite-provider.cH A D08-Nov-2020128.7 KiB4,0383,346

gda-sqlite-provider.hH A D08-Nov-20202.1 KiB5622

gda-sqlite-pstmt.cH A D08-Nov-20203 KiB11268

gda-sqlite-pstmt.hH A D08-Nov-20202.2 KiB6534

gda-sqlite-recordset.cH A D08-Nov-202025.4 KiB761613

gda-sqlite-recordset.hH A D08-Nov-20202.5 KiB6128

gda-sqlite-util.cH A D08-Nov-20208.8 KiB382309

gda-sqlite-util.hH A D08-Nov-20201.8 KiB4916

gda-sqlite.hH A D08-Nov-20202.1 KiB6835

gda-symbols-util.cH A D08-Nov-202011.2 KiB298251

gda-symbols-util.hH A D08-Nov-20205.3 KiB12786

gen_emb_string.cH A D08-Nov-20205 KiB199137

keywords.listH A D18-Mar-2019959 123120

keywords_hash.hH A D18-Mar-20191.9 KiB4837

mkkeywordhash.cH A D08-Nov-202014.1 KiB500409

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