Repository navigation
Expand file tree
/
Copy pathREADME
More file actions
58 lines (40 loc) · 2.13 KB
/
Copy pathREADME
File metadata and controls
58 lines (40 loc) · 2.13 KB
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
50
51
52
53
54
55
56
57
58
sqlite3 (Sqlite3) module for Qore
version 1.1 by Petr Vanek, David Nichols
Requires qore 1.7.2+ and sqlite3 headers and library to build
The driver supports the following features:
* all sqlite3 afinities (datatypes) are supported
* "date" types are supported only for writing from Qore. See SQLite3
docs for more informations about its dates handling.
* thread-safe
* transaction management is supported
* transparent character encoding conversion is supported if necessary
The driver's name is "sqlite3".
ex: Datasource db("sqlite3:@/tmp/my-db.sqlite");
The Qore sqlite3 driver uses binary communication with SQLite3 files
test/example scripts are stored in test/ subdirectory
Connection setup releases native handles on failure and preserves cancellation
received while SQLite opens or initializes a database. SQLite has no network
login or address list; cancellation is checked after the native filesystem call
returns.
To test connection cleanup and cancellation without installing the module:
cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build-debug -j4
qore -b --enable-debug -l build-debug/sqlite3-api-$(qore --latest-module-api).qmod test/connection-setup.qtest
On Linux, the preload fixture also tests interruption inside the native open call:
QORE_TEST_SQLITE_INTERRUPT=1 LD_PRELOAD="$PWD/build-debug/libsqlite3_open_interrupt.so" \
qore -b --enable-debug -l build-debug/sqlite3-api-$(qore --latest-module-api).qmod test/connection-setup.qtest
Run the connection suite under Valgrind to verify failed-open handle cleanup.
BUILD AND INSTALL
-----------------
The SQLite3 DBI module requires the SQLite3 library and headers to build.
mkdir build && cd build
cmake ..
make
sudo make install
The cmake configuration will find out where your qore module directory is found
Develop CI
----------
After a squash merge into develop, CI checks the merged pull request head
as well as the merge commit and its parents. It reuses an earlier result
only when the Git trees match and the existing pipeline checks pass.
A missing PR, changed tree, or unavailable evidence runs the full suite.