2025-12-21 20:02:46 +05:00
2025-12-13 07:42:44 +05:00
2025-12-13 03:36:18 +05:00
2025-12-20 20:05:08 +05:00
2025-12-20 20:05:08 +05:00
2025-12-21 20:02:46 +05:00
2025-12-13 03:36:18 +05:00
2025-12-21 20:02:46 +05:00
2025-12-13 03:36:18 +05:00
2025-12-21 20:02:46 +05:00
2025-12-13 03:43:21 +05:00

tsqlite

A wrapper for sqlite that uses tlibc for error handling.

Build

  1. Clone this repository.

    git clone https://timerix.ddns.net/git/Timerix/tsqlite.git
    
  2. Install cbuild. Select latest version compatible with the one in project.config. Example: For 2.3.0 download latest 2.3.x.

  3. Clone tlibc. By default dependencies/tlibc.config expects that tlibc/ is present in the same directory as tsqlite/. If you cloned it to another directory, change DEPENDENCIES_DIR in tsqlite/project.user.config.

    git clone https://timerix.ddns.net/git/Timerix/tlibc.git
    
  4. Install sqlite library.
    MinGW: pacman -S mingw-w64-x86_64-sqlite3

  5. Build and run tests

    cd tsqlite
    cbuild build_exec exec
    
  6. To build library use tasks build_static_lib[_dbg] or build_shared_lib[_dbg]

  7. If you use tsqlite as static library, add LINKER_LIBS from tsqlite project.config to your project.

Usage

#include "tsqlite.h"

int main(){
    Deferral(32); // reserve memory for 32 defers
    // init tlibc global variables
    try_fatal_void(tlibc_init());
    // init tsqlite global variables
    try_fatal_void(tsqlite_init());
    Defer(tlibc_deinit());
    Defer(tsqlite_deinit());
    
    Return 0; // call defers
}
Description
libsqlite wrapper
Readme 66 KiB
Languages
C 52.4%
Shell 47.6%