fb-cpp 1.0.0: A feature-complete modern C++ wrapper for Firebird
I am pleased to announce the 1.0.0 release of
fb-cpp, a modern C++ wrapper for the Firebird database API.
This release marks an important milestone: fb-cpp is now feature-complete in the scope of its public database client
API. The project has grown from a collection of wrappers around the Firebird interfaces into a complete, consistent
library for building Firebird applications in modern C++.
What feature-complete means
The core database workflow is covered from end to end. An application can load the Firebird client library, connect to a database, configure and manage transactions, prepare and execute SQL, bind parameters, fetch rows, and commit or roll back changes through a C++ API designed around RAII.
The public API also covers the surrounding capabilities needed by real applications:
- Typed access to strings, binary values, integers, scaled numerics, floating-point values, dates, times, timestamps,
time zones,
INT128,DECFLOAT, blobs, and arrays. - Parameter and result binding with native C++ types,
std::optional, tuples, structs, and variants. - Disconnected
RowSetbuffers that remain usable after the originating statement is released. - Bulk operations through
Batch, including batch blob handling and completion state inspection. - Multi-database transactions with two-phase commit support.
- Firebird event notifications through callbacks.
- Backup, restore, database maintenance, shutdown, startup, and other service-manager operations.
- Attachment pooling, connection health checks, session reset, and database lifecycle operations.
This means users can use the same library for ordinary SQL access, high-throughput data loading, asynchronous database notifications, and administrative tooling instead of falling back to unrelated low-level wrappers for those tasks.
The final pieces in 1.0.0
The releases leading to 1.0.0 added the parts needed to complete the feature set.
Firebird arrays
The new Array, ArrayId, and ArrayDescriptor types provide access to Firebird array values. Applications can read and
write complete array slices using raw Firebird-format bytes or trivially copyable C++ element types, including
multidimensional arrays. Array identifiers can also be read from and bound to SQL statements.
Direct BLR requests
The new fbcpp::request API exposes Firebird
requests for cases where SQL is not the right abstraction. A caller can compile a BLR program, describe its messages with
RequestMessageFormat, and use typed messages with start, send, receive, and unwind.
This keeps a specialized low-level Firebird capability available without requiring applications to manipulate message buffers and alignment by hand.
Binary and blob utilities
Binary values are now represented naturally as std::vector<std::byte>, with setBytes() and getBytes() support for
binary text and varying fields. This is separate from blob handling, so applications can distinguish an empty binary value
from a null value and can choose the appropriate representation for OCTETS data.
For blobs, Attachment now provides convenient conversions between complete blobs and strings or byte vectors. These
helpers are null-aware and handle segmented reads and writes, while the Blob class remains available for streaming and
explicit segment-based access.
Correct row batching
RowSet now includes the row already fetched by Statement::execute() or a later cursor operation. It consumes that row
before fetching the remaining rows, so consecutive row sets neither lose the first row nor return it twice. The result is a
more predictable disconnected result buffer for both normal queries and stored procedures.
A consistent C++ interface
The library uses C++20 features where they improve the interface without hiding Firebird concepts. Handles are managed with RAII and smart pointers, failures are reported through exceptions, and typed conversions validate the Firebird descriptor before accessing a value.
Installation and documentation
fb-cpp can be integrated with CMake and vcpkg. The project provides CMake presets for configuring and building the
library and is available through the
firebird-vcpkg-registry:
vcpkg install fb-cpp
The complete API reference is available in the
fb-cpp documentation. Source code, examples, tests, and build instructions are
available in the GitHub repository, and the release is tagged as
v1.0.0.
A stable foundation
Feature-complete does not mean feature-frozen. Future releases can continue to improve performance, documentation,
portability, and individual APIs, as well as add support for new Firebird capabilities. The significance of 1.0.0 is
that the foundational public API is now in place and ready for applications that need a complete modern C++ interface to
Firebird.
If you are starting a new Firebird application in C++, or replacing direct client-interface code with a safer and more
expressive abstraction, please give fb-cpp a try.