SQLite3 bindings for Uiua
Uiqlite provides native SQLite3 bindings for the Uiua programming language, enabling database operations through Uiua's array-oriented paradigm. The library wraps SQLite's C API using Uiua's FFI system and provides Uiua functions for database interactions.
- Low-level functions for interaction with SQLite databases
- Idiomatic high-level idiomatic functions to simplify the API for Uiua
- Automatic type detection and conversion between Uiua and SQLite types
Adding Uiqlite to your project:
Sql ~ "git: github.com/uiua-lang/uiqlite"
Uiqlite uses Uiua's Foreign Function Interface (FFI) system to call SQLite's C API directly, only works in native environment on supported platforms (Windows, MacOS, Linux). Does not work in the browser environment.
See the examples/ directory for complete working examples:
raw_query.ua: Basic table creation and queryingusing_datadef.ua: Working with query results as structured data using Uiua's data definitionsprepared_insert.ua: Using prepared statements with positional and named parameters
If you add new functionality or fix a bug, please add the appropriate tests to the test.ua file.
Use this command to run the test suite:
uiua run test.uaIf the script runs without errors - everything should be working as expected.
A build script is included to compile SQLite for all supported platforms. Uiua's module system clones this whole repository which makes those binaries reliably available to the library users.
Run this command to rebuild the library:
bin/build.shThe script was only tested on Linux, but it should work on Windows via WSL.