Skip to content

Repository files navigation

sqlixx: sqlite on C++ steroids

Library status pre-commit CI Tests codecov

sqlixx is a C++23 module library that wraps the SQLite database library.

Implements: module sqlixx with connections, statements, binders, and readers.

Status: Experimental


License

sqlixx is released under the MIT License


import std;
import sqlixx;

int main() {
    if (auto conn = sqlixx::open_connection("file:data.db?mode=ro&cache=private", sqlixx::open::uri)) {
        if (auto prep = sqlixx::prepare_statement(*conn, "SELECT u.id, u.name FROM users AS u WHERE u.status = ?;")) {
            if (auto bind_res = sqlixx::bind_parameters(prep->stmt, "active")) {
                int id;
                std::string_view name;
                for (auto row : sqlixx::execute(prep->stmt)) {
                    if (sqlixx::read_tuple(row, std::tie(id, name))) {
                        std::println("id = {}, name = {}", id, name);
                    }
                }
            }
        }
    }
    return 0;
}

About

SQLite on C++ steroids

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages