|
fb-cpp 0.0.2
A modern C++ wrapper for the Firebird database API
|
fb-cpp namespace. More...
Classes | |
| class | Attachment |
| Represents a connection to a Firebird database. More... | |
| class | AttachmentOptions |
| Represents options used when creating an Attachment object. More... | |
| class | Blob |
| Provides read and write access to Firebird blobs. More... | |
| class | BlobId |
| Represents a Firebird blob identifier. More... | |
| class | BlobOptions |
| Additional options used when creating or opening blobs. More... | |
| class | Client |
| Represents a Firebird client library instance. More... | |
| class | DatabaseException |
| Exception thrown when a Firebird database operation fails. More... | |
| struct | Descriptor |
| Describes a parameter or column. More... | |
| struct | EventCount |
| Represents the number of occurrences for a registered event delivered by Firebird. More... | |
| class | EventListener |
| Observes Firebird events and forwards aggregated counts to a callback on a background thread. More... | |
| class | FbCppException |
| Base exception class for all fb-cpp exceptions. More... | |
| class | FbRef |
| Reference-counted smart pointer for Firebird objects using addRef/release semantics. More... | |
| struct | OpaqueDate |
| Wrapper for Firebird date values. More... | |
| struct | OpaqueTime |
| Wrapper for Firebird time values. More... | |
| struct | OpaqueTimestamp |
| Wrapper for Firebird timestamp values. More... | |
| struct | OpaqueTimestampTz |
| Wrapper for Firebird timestamp-with-time-zone values. More... | |
| struct | OpaqueTimeTz |
| Wrapper for Firebird time-with-time-zone values. More... | |
| struct | ScaledNumber |
| Represents a numeric value with an explicit decimal scale. More... | |
| class | Statement |
| Prepares, executes, and fetches SQL statements against a Firebird attachment. More... | |
| class | StatementOptions |
| Represents options used when preparing a Statement. More... | |
| struct | Timestamp |
| Combined date and time with microsecond precision. More... | |
| struct | TimestampTz |
| Timestamp bound to a time zone. More... | |
| struct | TimeTz |
| Local time bound to a time zone. More... | |
| class | Transaction |
| Represents a transaction in one or more Firebird databases. More... | |
| class | TransactionOptions |
| Represents options used when creating a Transaction object. More... | |
Concepts | |
| concept | Aggregate |
| Concept constraining types to aggregates suitable for struct binding. | |
| concept | TupleLike |
| Concept constraining types to tuple-like types (std::tuple, std::pair, std::array). | |
| concept | VariantLike |
| Concept constraining types to std::variant types. | |
Typedefs | |
| template<typename T > | |
| using | FbUniquePtr = std::unique_ptr< T, impl::FbDisposeDeleter > |
| Unique pointer type for Firebird disposable objects. | |
| using | ScaledInt16 = ScaledNumber< std::int16_t > |
| Signed 16-bit scaled number. | |
| using | ScaledInt32 = ScaledNumber< std::int32_t > |
| Signed 32-bit scaled number. | |
| using | ScaledInt64 = ScaledNumber< std::int64_t > |
| Signed 64-bit scaled number. | |
| using | BoostInt128 = boost::multiprecision::int128_t |
| 128-bit integer using Boost.Multiprecision. | |
| using | ScaledBoostInt128 = ScaledNumber< BoostInt128 > |
| Scaled 128-bit integer backed by Boost.Multiprecision. | |
| using | BoostDecFloat16 = boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 16 > > |
| 16-digit decimal floating point using Boost.Multiprecision. | |
| using | BoostDecFloat34 = boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 34 > > |
| 34-digit decimal floating point using Boost.Multiprecision. | |
| using | Date = std::chrono::year_month_day |
| Firebird SQL calendar date. | |
| using | Time = std::chrono::hh_mm_ss< std::chrono::microseconds > |
| Firebird SQL time-of-day with microsecond resolution. | |
| using | OpaqueInt128 = FB_I128 |
| Opaque 128-bit integer exposed by the Firebird API. | |
| using | OpaqueDecFloat16 = FB_DEC16 |
| Opaque 16-digit decimal floating point exposed by the Firebird API. | |
| using | OpaqueDecFloat34 = FB_DEC34 |
| Opaque 34-digit decimal floating point exposed by the Firebird API. | |
| using | ScaledOpaqueInt128 = ScaledNumber< OpaqueInt128 > |
| Scaled Firebird opaque 128-bit integer. | |
Enumerations | |
| enum class | BlobStorage : std::uint8_t { MAIN = isc_bpb_storage_main , TEMPORARY = isc_bpb_storage_temp } |
| Blob storage options. More... | |
| enum class | BlobType : std::uint8_t { SEGMENTED = isc_bpb_type_segmented , STREAM = isc_bpb_type_stream } |
| Blob type. More... | |
| enum class | BlobSeekMode : int { FROM_BEGIN = 0 , FROM_CURRENT = blb_seek_relative , FROM_END = blb_seek_from_tail } |
| Defines the origin used when repositioning a blob. More... | |
| enum class | DescriptorOriginalType : unsigned { NULL_TYPE = SQL_NULL , TEXT = SQL_TEXT , VARYING = SQL_VARYING , SHORT = SQL_SHORT , LONG = SQL_LONG , FLOAT = SQL_FLOAT , DOUBLE = SQL_DOUBLE , TIMESTAMP = SQL_TIMESTAMP , BLOB = SQL_BLOB , TIME = SQL_TYPE_TIME , DATE = SQL_TYPE_DATE , INT64 = SQL_INT64 , TIMESTAMP_TZ = SQL_TIMESTAMP_TZ , TIMESTAMP_TZ_EX = SQL_TIMESTAMP_TZ_EX , TIME_TZ = SQL_TIME_TZ , TIME_TZ_EX = SQL_TIME_TZ_EX , INT128 = SQL_INT128 , DEC16 = SQL_DEC16 , DEC34 = SQL_DEC34 , BOOLEAN = SQL_BOOLEAN } |
| Descriptor original type. More... | |
| enum class | DescriptorAdjustedType : unsigned { NULL_TYPE = SQL_NULL , STRING = SQL_VARYING , INT16 = SQL_SHORT , INT32 = SQL_LONG , FLOAT = SQL_FLOAT , DOUBLE = SQL_DOUBLE , TIMESTAMP = SQL_TIMESTAMP , BLOB = SQL_BLOB , TIME = SQL_TYPE_TIME , DATE = SQL_TYPE_DATE , INT64 = SQL_INT64 , TIMESTAMP_TZ = SQL_TIMESTAMP_TZ , TIMESTAMP_TZ_EX = SQL_TIMESTAMP_TZ_EX , TIME_TZ = SQL_TIME_TZ , TIME_TZ_EX = SQL_TIME_TZ_EX , INT128 = SQL_INT128 , DECFLOAT16 = SQL_DEC16 , DECFLOAT34 = SQL_DEC34 , BOOLEAN = SQL_BOOLEAN } |
| Descriptor adjusted type. More... | |
| enum class | StatementType : unsigned { SELECT = isc_info_sql_stmt_select , INSERT = isc_info_sql_stmt_insert , UPDATE = isc_info_sql_stmt_update , DELETE = isc_info_sql_stmt_delete , DDL = isc_info_sql_stmt_ddl , GET_SEGMENT = isc_info_sql_stmt_get_segment , PUT_SEGMENT = isc_info_sql_stmt_put_segment , EXEC_PROCEDURE = isc_info_sql_stmt_exec_procedure , START_TRANSACTION = isc_info_sql_stmt_start_trans , COMMIT = isc_info_sql_stmt_commit , ROLLBACK = isc_info_sql_stmt_rollback , SELECT_FOR_UPDATE = isc_info_sql_stmt_select_for_upd , SET_GENERATOR = isc_info_sql_stmt_set_generator , SAVEPOINT = isc_info_sql_stmt_savepoint } |
| Distinguishes the semantic category of the prepared SQL statement. More... | |
| enum class | TransactionIsolationLevel { CONSISTENCY , READ_COMMITTED , SNAPSHOT } |
| Transaction isolation level. More... | |
| enum class | TransactionReadCommittedMode { NO_RECORD_VERSION , RECORD_VERSION } |
| Transaction read committed mode. More... | |
| enum class | TransactionAccessMode { READ_ONLY , READ_WRITE } |
| Transaction access mode. More... | |
| enum class | TransactionWaitMode { NO_WAIT , WAIT } |
| Transaction wait mode. More... | |
| enum class | TransactionState { ACTIVE , PREPARED , COMMITTED , ROLLED_BACK } |
| Transaction state for tracking two-phase commit lifecycle. More... | |
Functions | |
| template<typename T > | |
| FbUniquePtr< T > | fbUnique (T *obj) noexcept |
| Creates a unique pointer for a Firebird disposable object. | |
| template<typename T > | |
| FbRef< T > | fbRef (T *arg) noexcept |
| Creates a reference-counted smart pointer for a Firebird object. | |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const fbcpp::ScaledNumber< T > &scaledNumber) |
Stream insertion helper that renders the scaled number as value followed by e and the scale. | |
Convenience template specializations | |
| template<> | |
| std::optional< bool > | Statement::get< std::optional< bool > > (unsigned index) |
| template<> | |
| std::optional< BlobId > | Statement::get< std::optional< BlobId > > (unsigned index) |
| template<> | |
| std::optional< std::int16_t > | Statement::get< std::optional< std::int16_t > > (unsigned index) |
| template<> | |
| std::optional< ScaledInt16 > | Statement::get< std::optional< ScaledInt16 > > (unsigned index) |
| template<> | |
| std::optional< std::int32_t > | Statement::get< std::optional< std::int32_t > > (unsigned index) |
| template<> | |
| std::optional< ScaledInt32 > | Statement::get< std::optional< ScaledInt32 > > (unsigned index) |
| template<> | |
| std::optional< std::int64_t > | Statement::get< std::optional< std::int64_t > > (unsigned index) |
| template<> | |
| std::optional< ScaledInt64 > | Statement::get< std::optional< ScaledInt64 > > (unsigned index) |
| template<> | |
| std::optional< ScaledOpaqueInt128 > | Statement::get< std::optional< ScaledOpaqueInt128 > > (unsigned index) |
| template<> | |
| std::optional< BoostInt128 > | Statement::get< std::optional< BoostInt128 > > (unsigned index) |
| template<> | |
| std::optional< ScaledBoostInt128 > | Statement::get< std::optional< ScaledBoostInt128 > > (unsigned index) |
| template<> | |
| std::optional< float > | Statement::get< std::optional< float > > (unsigned index) |
| template<> | |
| std::optional< double > | Statement::get< std::optional< double > > (unsigned index) |
| template<> | |
| std::optional< OpaqueDecFloat16 > | Statement::get< std::optional< OpaqueDecFloat16 > > (unsigned index) |
| template<> | |
| std::optional< BoostDecFloat16 > | Statement::get< std::optional< BoostDecFloat16 > > (unsigned index) |
| template<> | |
| std::optional< OpaqueDecFloat34 > | Statement::get< std::optional< OpaqueDecFloat34 > > (unsigned index) |
| template<> | |
| std::optional< BoostDecFloat34 > | Statement::get< std::optional< BoostDecFloat34 > > (unsigned index) |
| template<> | |
| std::optional< Date > | Statement::get< std::optional< Date > > (unsigned index) |
| template<> | |
| std::optional< OpaqueDate > | Statement::get< std::optional< OpaqueDate > > (unsigned index) |
| template<> | |
| std::optional< Time > | Statement::get< std::optional< Time > > (unsigned index) |
| template<> | |
| std::optional< OpaqueTime > | Statement::get< std::optional< OpaqueTime > > (unsigned index) |
| template<> | |
| std::optional< OpaqueTimestamp > | Statement::get< std::optional< OpaqueTimestamp > > (unsigned index) |
| template<> | |
| std::optional< Timestamp > | Statement::get< std::optional< Timestamp > > (unsigned index) |
| template<> | |
| std::optional< TimeTz > | Statement::get< std::optional< TimeTz > > (unsigned index) |
| template<> | |
| std::optional< OpaqueTimeTz > | Statement::get< std::optional< OpaqueTimeTz > > (unsigned index) |
| template<> | |
| std::optional< TimestampTz > | Statement::get< std::optional< TimestampTz > > (unsigned index) |
| template<> | |
| std::optional< OpaqueTimestampTz > | Statement::get< std::optional< OpaqueTimestampTz > > (unsigned index) |
| template<> | |
| std::optional< std::string > | Statement::get< std::optional< std::string > > (unsigned index) |
fb-cpp namespace.
| using fbcpp::BoostDecFloat16 = typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<16> > |
| using fbcpp::BoostDecFloat34 = typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<34> > |
| using fbcpp::BoostInt128 = typedef boost::multiprecision::int128_t |
| using fbcpp::Date = typedef std::chrono::year_month_day |
| using fbcpp::FbUniquePtr = typedef std::unique_ptr<T, impl::FbDisposeDeleter> |
Unique pointer type for Firebird disposable objects.
Definition at line 53 of file SmartPtrs.h.
| using fbcpp::OpaqueDecFloat16 = typedef FB_DEC16 |
| using fbcpp::OpaqueDecFloat34 = typedef FB_DEC34 |
| using fbcpp::OpaqueInt128 = typedef FB_I128 |
| using fbcpp::ScaledBoostInt128 = typedef ScaledNumber<BoostInt128> |
| using fbcpp::ScaledInt16 = typedef ScaledNumber<std::int16_t> |
| using fbcpp::ScaledInt32 = typedef ScaledNumber<std::int32_t> |
| using fbcpp::ScaledInt64 = typedef ScaledNumber<std::int64_t> |
| using fbcpp::ScaledOpaqueInt128 = typedef ScaledNumber<OpaqueInt128> |
| using fbcpp::Time = typedef std::chrono::hh_mm_ss<std::chrono::microseconds> |
|
strong |
|
strong |
|
strong |
|
strong |
Descriptor adjusted type.
| Enumerator | |
|---|---|
| NULL_TYPE | Null type indicator. |
| STRING | String type (variable-length). |
| INT16 | 16-bit signed integer. |
| INT32 | 32-bit signed integer. |
| FLOAT | Single-precision floating point. |
| DOUBLE | Double-precision floating point. |
| TIMESTAMP | Timestamp without time zone. |
| BLOB | Binary large object. |
| TIME | Time of day without time zone. |
| DATE | Calendar date. |
| INT64 | 64-bit signed integer. |
| TIMESTAMP_TZ | Timestamp with time zone. |
| TIMESTAMP_TZ_EX | Extended timestamp with time zone. |
| TIME_TZ | Time of day with time zone. |
| TIME_TZ_EX | Extended time of day with time zone. |
| INT128 | 128-bit signed integer. |
| DECFLOAT16 | 16-digit decimal floating point. |
| DECFLOAT34 | 34-digit decimal floating point. |
| BOOLEAN | Boolean value. |
Definition at line 145 of file Descriptor.h.
|
strong |
Descriptor original type.
| Enumerator | |
|---|---|
| NULL_TYPE | Null type indicator. |
| TEXT | Fixed-length text. |
| VARYING | Variable-length text. |
| SHORT | 16-bit signed integer. |
| LONG | 32-bit signed integer. |
| FLOAT | Single-precision floating point. |
| DOUBLE | Double-precision floating point. |
| TIMESTAMP | Timestamp without time zone. |
| BLOB | Binary large object. |
| TIME | Time of day without time zone. |
| DATE | Calendar date. |
| INT64 | 64-bit signed integer. |
| TIMESTAMP_TZ | Timestamp with time zone. |
| TIMESTAMP_TZ_EX | Extended timestamp with time zone. |
| TIME_TZ | Time of day with time zone. |
| TIME_TZ_EX | Extended time of day with time zone. |
| INT128 | 128-bit signed integer. |
| DEC16 | 16-digit decimal floating point. |
| DEC34 | 34-digit decimal floating point. |
| BOOLEAN | Boolean value. |
Definition at line 39 of file Descriptor.h.
|
strong |
Distinguishes the semantic category of the prepared SQL statement.
| Enumerator | |
|---|---|
| SELECT | Server classified the statement as a |
| INSERT | Server classified the statement as an |
| UPDATE | Server classified the statement as an |
| DELETE | Server classified the statement as a |
| DDL | Statement performs data definition operations. |
| GET_SEGMENT | Statement reads a blob segment - legacy feature. |
| PUT_SEGMENT | Statement writes a blob segment - legacy feature. |
| EXEC_PROCEDURE | Statement executes a stored procedure. |
| START_TRANSACTION | Statement starts a new transaction. |
| COMMIT | Statement commits a transaction. |
| ROLLBACK | Statement rolls back a transaction. |
| SELECT_FOR_UPDATE | Cursor-based |
| SET_GENERATOR | Statement sets a generator (sequence) value. |
| SAVEPOINT | Statement manages a savepoint. |
Definition at line 141 of file Statement.h.
|
strong |
Transaction access mode.
| Enumerator | |
|---|---|
| READ_ONLY | Transaction can only read data; write operations are not permitted. |
| READ_WRITE | Transaction can read and write data. |
Definition at line 87 of file Transaction.h.
|
strong |
Transaction isolation level.
Definition at line 50 of file Transaction.h.
|
strong |
Transaction read committed mode.
| Enumerator | |
|---|---|
| NO_RECORD_VERSION | Does not allow reading of record versions; waits for or errors on uncommitted changes. |
| RECORD_VERSION | Allows reading of the latest committed version of a record. |
Definition at line 71 of file Transaction.h.
|
strong |
Transaction state for tracking two-phase commit lifecycle.
| Enumerator | |
|---|---|
| ACTIVE | Transaction is active and can execute statements. |
| PREPARED | Transaction has been prepared (2PC phase 1). |
| COMMITTED | Transaction has been committed. |
| ROLLED_BACK | Transaction has been rolled back. |
Definition at line 306 of file Transaction.h.
|
strong |
Transaction wait mode.
| Enumerator | |
|---|---|
| NO_WAIT | Transaction returns an error immediately if a lock conflict occurs. |
| WAIT | Transaction waits until a conflicting lock is released. |
Definition at line 103 of file Transaction.h.
|
noexcept |
Creates a reference-counted smart pointer for a Firebird object.
Definition at line 229 of file SmartPtrs.h.
|
noexcept |
Creates a unique pointer for a Firebird disposable object.
Definition at line 59 of file SmartPtrs.h.
| std::ostream & fbcpp::operator<< | ( | std::ostream & | os, |
| const fbcpp::ScaledNumber< T > & | scaledNumber | ||
| ) |
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.
|
inline |
Definition at line 204 of file Statement.h.