Releases: vinzenz/vsqlite--
Releases · vinzenz/vsqlite--
vsqlite++ 0.4.0
This release is a complete refresh of the wrapper and is not backward compatible with 0.3.x. The codebase now targets modern C++20 (GCC 11+, Clang 14+, MSVC 19.30+) and adopts a cleaner namespace layout, richer abstractions, and up-to-date tooling. All notes below cover the work that landed after commit 11046037.
Breaking changes
- The public API now lives in an inline
sqlite::v2namespace and carries many signature changes; existing code must be updated before recompiling. - A C++20-capable compiler is required. Legacy compiler support and the historical Autotools/Premake build files were deleted in favor of the unified CMake toolchain.
sqlite::connection::get_row_count()has been removed in favor of the more accuratesqlite::connection::get_changes(), matching SQLite's semantics.- Thread-safety rules were tightened: connections remain single-threaded objects, and callers should adopt the new
sqlite::connection_poolplussqlite::configure_threading()helpers to coordinate access.
Highlights
Modern resource management
- Added
sqlite::connection_pool, RAII transaction/savepoint improvements, and dedicated threading helpers to safely fan out work across worker threads (349ac11,682d643). - New statement cache automatically reuses prepared statements across commands, reducing prepare/step churn in hot paths (
496a366).
Richer query ergonomics
- Added named parameter binding helpers and documentation for placeholder usage so commands can be expressed with descriptive
:nameparameters (7ccdb4a,4d289ab). - Improved string-oriented binding by unifying
std::string_view, character pointers, and string literals through constrained templates (a8e8ad7,325ddc5,e9a4dbf). - Added strongly typed bind/get utilities, tuple materialization, and lightweight row views so structured bindings work out of the box (
f480f9b,789765e).
Extension & data helpers
- Introduced a lambda-based
sqlite::create_functionAPI for registering custom SQL functions straight from C++ (34c785d). - Added WAL2/snapshot helpers, session/change tracking wrappers, serialization APIs, and JSON/FTS utilities to cover more advanced SQLite features (
1cd09a7,7aa8831,46eff6c,a5c2f2d).
Filesystem & diagnostics
- Connection objects can now be wired to custom filesystem adapters, enabling sandboxed or virtual filesystems when opening databases (
30f7d8b). - Error messages expose richer SQL diagnostics and hardened identifier quoting/file handling paths to avoid accidental data loss (
a851470,968a875).
Toolchain & CI
- CTest integration is on by default, paired with a comprehensive GoogleTest suite plus optional coverage instrumentation (
6f72059,603b959,96edb39). - The project exports
compile_commands.jsonand ships clangd/clang-format settings for modern IDEs (c665da9,3ea6fc2,bf652ea,98b5efe). - Continuous integration moved from Travis CI to GitHub Actions, now exercising GCC 13 on Ubuntu 24.04 and guaranteeing a C++20-capable toolchain (
d4a9309,ae58613,ab58922,2f3642a).
Quality fixes
- Fixed a crash that retried commit/rollback twice when SQLite raised an error, and addressed command binding reuse issues uncovered by the new tests (
e08aa0e,f976cc6). - Documented that FTS5 lacks
matchinfo()/offsets()so users aren’t surprised when porting search code from FTS3/4 (ed67b6b).
Getting started
Builds now assume CMake ≥3.21 with SQLite::SQLite3 available. To embed the library, either install it and find_package(vsqlitepp CONFIG REQUIRED) or reference it directly from another project via CMake FetchContent while turning off the bundled examples/tests.