File: README

package info (click to toggle)
libgda4 4.0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 34,928 kB
  • ctags: 18,543
  • sloc: ansic: 187,884; sh: 10,317; xml: 7,903; yacc: 3,454; makefile: 1,974; java: 1,253; python: 896; sql: 321
file content (49 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Which version of SQLite is used:
================================

When embedded SQLITE is used:
* HAVE_SQLITE is *not* defined
* patch it to add the PRAGMA command
* linked as static

When system SQLITE is used:
* HAVE_SQLITE is defined
* obviously not patched for PRAGMA
* linked as dynamic => override the sqlite3CreateFunc function
* For WIN32 (or MacOSX) we would need to use another mechanism (see lattice.umiacs.umd.edu/files/functions_tr.pdf) => impose embedded static lib

Possible solutions in the future:
1 - make SQLite implement the required PRAGMA (patch proposed)
2 - don't use the required PRAGMA at all, and manage to intercept the sqlite3CreateFunc call
    when statically linked (=> modify the source code of SQLite) 




BLOB handling in SQLite:
========================

SQLite now supports incremental I/O for BLOBS. Any data in any column can be accessed
with this API.

When writing a blob to the database:
------------------------------------
Opening a blob requires the following information:
* the database name
* the table name
* the column name
* the ROWID

The first 3 pieces of information can be obtained from the INSERT or UPDATE statement
itself.

The ROWID can be obtained using sqlite3_last_insert_rowid() for an INSERT or must be queried
for an UPDATE.

When reading a blob from the database:
--------------------------------------
Opening a blob requires the following information:
* the database name: use sqlite3_column_database_name()
* the table name: use sqlite3_column_table_name()
* the column name: use sqlite3_column_origin_name()
* the ROWID: get it from the SELECT as the last row.