|
| 1 | +# vsqlite++ 0.4.0 |
| 2 | + |
| 3 | +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`. |
| 4 | + |
| 5 | +## Breaking changes |
| 6 | + |
| 7 | +- The public API now lives in an inline `sqlite::v2` namespace and carries many signature changes; existing code must be updated before recompiling. |
| 8 | +- 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. |
| 9 | +- `sqlite::connection::get_row_count()` has been removed in favor of the more accurate `sqlite::connection::get_changes()`, matching SQLite's semantics. |
| 10 | +- Thread-safety rules were tightened: connections remain single-threaded objects, and callers should adopt the new `sqlite::connection_pool` plus `sqlite::configure_threading()` helpers to coordinate access. |
| 11 | + |
| 12 | +## Highlights |
| 13 | + |
| 14 | +### Modern resource management |
| 15 | +- Added `sqlite::connection_pool`, RAII transaction/savepoint improvements, and dedicated threading helpers to safely fan out work across worker threads (`349ac11`, `682d643`). |
| 16 | +- New statement cache automatically reuses prepared statements across commands, reducing prepare/step churn in hot paths (`496a366`). |
| 17 | + |
| 18 | +### Richer query ergonomics |
| 19 | +- Added named parameter binding helpers and documentation for placeholder usage so commands can be expressed with descriptive `:name` parameters (`7ccdb4a`, `4d289ab`). |
| 20 | +- Improved string-oriented binding by unifying `std::string_view`, character pointers, and string literals through constrained templates (`a8e8ad7`, `325ddc5`, `e9a4dbf`). |
| 21 | +- Added strongly typed bind/get utilities, tuple materialization, and lightweight row views so structured bindings work out of the box (`f480f9b`, `789765e`). |
| 22 | + |
| 23 | +### Extension & data helpers |
| 24 | +- Introduced a lambda-based `sqlite::create_function` API for registering custom SQL functions straight from C++ (`34c785d`). |
| 25 | +- Added WAL2/snapshot helpers, session/change tracking wrappers, serialization APIs, and JSON/FTS utilities to cover more advanced SQLite features (`1cd09a7`, `7aa8831`, `46eff6c`, `a5c2f2d`). |
| 26 | + |
| 27 | +### Filesystem & diagnostics |
| 28 | +- Connection objects can now be wired to custom filesystem adapters, enabling sandboxed or virtual filesystems when opening databases (`30f7d8b`). |
| 29 | +- Error messages expose richer SQL diagnostics and hardened identifier quoting/file handling paths to avoid accidental data loss (`a851470`, `968a875`). |
| 30 | + |
| 31 | +### Toolchain & CI |
| 32 | +- CTest integration is on by default, paired with a comprehensive GoogleTest suite plus optional coverage instrumentation (`6f72059`, `603b959`, `96edb39`). |
| 33 | +- The project exports `compile_commands.json` and ships clangd/clang-format settings for modern IDEs (`c665da9`, `3ea6fc2`, `bf652ea`, `98b5efe`). |
| 34 | +- 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`). |
| 35 | + |
| 36 | +### Quality fixes |
| 37 | +- 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`). |
| 38 | +- Documented that FTS5 lacks `matchinfo()`/`offsets()` so users aren’t surprised when porting search code from FTS3/4 (`ed67b6b`). |
| 39 | + |
| 40 | +## Getting started |
| 41 | + |
| 42 | +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. |
0 commit comments