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

Consume vsqlite++ through CMake, C++ package managers, or native Linux packages built from tagged releases.

CMake package

Build and install from source, then use the exported vsqlite::vsqlitepp target from downstream projects.

cmake -S . -B build -DBUILD_SHARED_LIBS=ON
cmake --build build
cmake --install build --prefix /usr/local

FetchContent

Embed the project directly. Tests, examples, and install rules default to off when vsqlite++ is used as a subproject.

FetchContent_Declare(vsqlitepp
  GIT_REPOSITORY https://github.com/vinzenz/vsqlite--
  GIT_TAG v${VSQLITEPP_VERSION})
FetchContent_MakeAvailable(vsqlitepp)

CPM.cmake

Use CPM.cmake if your project already centralizes CMake dependencies that way.

CPMAddPackage(
  NAME vsqlitepp
  GITHUB_REPOSITORY vinzenz/vsqlite--
  GIT_TAG v${VSQLITEPP_VERSION})

Conan

The repository includes a Conan 2 recipe and package test for validating generated packages.

conan create . --build=missing \
  -s compiler.cppstd=20

vcpkg overlay

Until vsqlite++ is accepted into the curated registry, use the checked-in overlay port.

vcpkg install vsqlitepp \
  --overlay-ports=packaging/vcpkg

Release artifacts

Tags matching v* publish source archives, Debian packages, RPM packages, and Arch Linux pacman packages to GitHub Releases.

Stay in the loop

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