Skip to content

About

Qore SQLite module

Resources

Stars

1 star

Watchers

12 watching

Forks

Repository files navigation

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.

About

Qore SQLite module

Resources

Stars

1 star

Watchers

12 watching

Forks

Releases

Packages

Contributors

Languages