Battle-tested since 2006

SQLite, the modern C++ way.

vsqlite++ wraps the SQLite C API with exception-safe RAII objects, connection pooling, JSON & FTS helpers, and batteries-included utilities so you can focus on your data.

C++20 Toolchain standard
RAII Connections & transactions
FTS ยท JSON Helpers included
Custom UDFs Functions, Methods, Lambdas
Statement Cache For faster execution

What you get

Whether you are shipping an embedded appliance or orchestrating microservices, vsqlite++ keeps your data layer tidy with expressive, zero-footgun primitives.

RAII-first design

Connections, transactions, savepoints, and results automatically clean up.

Thread-aware pooling

Use the built-in connection pool to safely multiplex SQLite handles across tasks.

Extension helpers

JSON path builders, FTS match/rank helpers, snapshot & session utilities.

Modern toolchain

C++20 + CMake

Five-minute tour

#include <sqlite/connection.hpp>
#include <sqlite/execute.hpp>
#include <sqlite/query.hpp>
#include <iostream>

int main() {
    sqlite::connection db("demo.db");
    sqlite::execute(db, "CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY, text TEXT);", true);

    sqlite::execute insert(db, "INSERT INTO notes(text) VALUES(?);");
    insert % "Hello from vsqlite++";
    insert();

    sqlite::query rows(db, "SELECT id, text FROM notes ORDER BY id DESC;");
    for(auto & row : rows.each()) {
        std::cout << '[' << row.get(0) << "] "
                  << row.get(1) << '\n';
    }
}

Install & upgrade

Ship directly from source or pull the prebuilt packages and keep your toolchains in sync.

  • Source packages: grab the latest tarball or zip from GitHub Releases.
  • CMake FetchContent: embed vsqlite::vsqlitepp directly with
    FetchContent_Declare(vsqlitepp
      GIT_REPOSITORY https://github.com/vinzenz/vsqlite--
      GIT_TAG v${VSQLITEPP_VERSION})
    set(VSQLITE_BUILD_TESTS OFF CACHE BOOL "" FORCE)
    set(VSQLITE_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
    FetchContent_MakeAvailable(vsqlitepp)
  • CMake: cmake -S . -B build -DBUILD_SHARED_LIBS=ON -DVSQLITE_BUILD_EXAMPLES=ON.

Stay in the loop

Join the maintainers, contributors, and teams building on top of vsqlite++.