The C++ API provides convenient access to ITTIA DB databases.
To access the C++ API, include ittia/db++.h. The API is encapsulated in the db namespace.
#include <ittia/db++.h> using namespace db;
Classes | |
| struct | TableDef |
| struct | IndexDef |
| struct | AnsiCharTraits |
| struct | UnicodeCharTraits |
| struct | CharTraits |
| struct | db::CharTraits< char > |
| struct | db::CharTraits< wchar_t > |
| class | NamedItem |
| A named item in a Collection. More... | |
| class | Collection |
| An order-preserving collection of NamedItems objects. More... | |
| class | Crypt |
| Encryption hook interface. More... | |
| class | Currency |
| Fixed-point currency value. More... | |
| class | UniCursor |
| Unidirectional cursor interface. More... | |
| class | BidiCursor |
| Bidirectional cursor interface. More... | |
| class | CursorRowAccessor |
| Interface which combines a cursor with a row accessor. More... | |
| class | Database |
| Database storage. More... | |
| class | FieldDescSet |
| A set of table fields. More... | |
| struct | FieldDesc |
| Field type information. More... | |
| class | Field |
| A Field that contains a typed value. More... | |
| class | IntegerField |
| A Field that contains an integer value. More... | |
| class | StringField |
| A Field that contains a String value. More... | |
| class | WStringField |
| A Field that contains a WString value. More... | |
| class | DateTimeField |
| A Field that contains a DateTime value. More... | |
| class | FloatField |
| A Field that contains a floating point value. More... | |
| class | CurrencyField |
| A Field that contains a Currency value. More... | |
| class | BlobField |
| A Field that contains a Binary Large OBject (BLOB) value. More... | |
| struct | IndexField |
| An index on a table. More... | |
| class | IndexFieldSet |
| A set of table indexes. More... | |
| class | IndexDesc |
| Index type information. More... | |
| class | IndexDescSet |
| A set of indexes on a table. More... | |
| struct | LockManagerConfig |
| Lock manager configuration. More... | |
| struct | LockManagerStatistics |
| Lock manager statistics. More... | |
| class | ObjectId |
| A unique identifier for an object in the database, such as a table or row. More... | |
| class | TableId |
| A unique identifier for a table. More... | |
| class | RowId |
| A unique identifier for a row. More... | |
| class | ObjectLock |
| Lock a database table or row. More... | |
| class | Query |
| An SQL query cursor. More... | |
| class | RowAccessor |
| Interface to access values stored in the fields of a row. More... | |
| class | Sequence |
| Integer number sequences. More... | |
| struct | StorageMode |
| Database storage options. More... | |
| struct | LibraryConfig |
| Library configuration. More... | |
| class | BasicString |
| String data type. More... | |
| class | Table |
| A Table cursor. More... | |
| class | DateTime |
| Time data type. More... | |
| class | Value |
| A value stored in a database field. More... | |
Typedefs | |
| typedef uint32_t | hash_t |
| typedef os_atomic_t | db_counter_t |
| typedef db_bufmgr_stat_t | BufferManagerStatistics |
| typedef db_buf_stat_t | BufferStatistics |
| typedef BasicString< char > | String |
| typedef BasicString< wchar_t > | WString |
Enumerations | |
| enum | CursorMode { DB_CURSOR_FOR_READ, DB_CURSOR_FOR_UPDATE } |
| enum | FieldRelation { DB_SEEK_LESS, DB_SEEK_LESS_OR_EQUAL, DB_SEEK_FIRST_EQUAL, DB_SEEK_LAST_EQUAL, DB_SEEK_GREATER, DB_SEEK_GREATER_OR_EQUAL, DB_SEEK_EQUAL = DB_SEEK_FIRST_EQUAL } |
| enum | FieldTypeTag { FIELD_TYPE_ANSISTRING = 1, FIELD_TYPE_UTFSTRING = 2, FIELD_TYPE_SINT = 3, FIELD_TYPE_UINT, FIELD_TYPE_FLOAT, FIELD_TYPE_CURRENCY, FIELD_TYPE_DATE_TIME, FIELD_TYPE_BLOB } |
| enum | { DB_DATE, DB_TIME, DB_DATETIME, DB_TIMESTAMP } |
| enum | Order { DB_ASCENDING, DB_DESCENDING } |
| enum | IndexMode { DB_UNIQUE, DB_MULTISET } |
| enum | TxIsolation { DB_DEFAULT_ISOLATION = _DB_DEFAULT_ISOLATION, DB_READ_COMMITTED = _DB_READ_COMMITTED, DB_REPEATABLE_READ = _DB_REPEATABLE_READ, DB_SERIALIZABLE = _DB_SERIALIZABLE } |
| enum | TxCompletionMode { DB_DEFAULT_COMPLETION = _DB_DEFAULT_COMPLETION, DB_LAZY_COMPLETION = _DB_LAZY_COMPLETION, DB_GROUP_COMPLETION = _DB_GROUP_COMPLETION, DB_FORCED_COMPLETION = _DB_FORCED_COMPLETION } |
| enum | TxFlushMode { DB_FLUSH_JOURNAL = _DB_FLUSH_JOURNAL, DB_FLUSH_DATA = _DB_FLUSH_STORAGE } |
| enum | ObjectLockMode { DB_LOCK_SHARED = _DB_LOCK_SHARED, DB_LOCK_EXCLUSIVE = _DB_LOCK_EXCLUSIVE } |
| enum | ObjectLockDuration { DB_INSTANT_LOCK = _DB_INSTANT_LOCK, DB_COMMIT_LOCK = _DB_COMMIT_LOCK, DB_MANUAL_LOCK = _DB_MANUAL_LOCK } |
| enum | { DB_TRY_LOCK = _DB_TRY_LOCK } |
| enum | QueryMode { DB_QUERY_CLOSED, DB_QUERY_PREPARED, DB_QUERY_BROWSE } |
| enum | TableMode { DB_TABLE_CLOSED, DB_TABLE_INSERTING, DB_TABLE_EDITING, DB_TABLE_BROWSING, DB_TABLE_SEEKING, DB_TABLE_RANGE_START, DB_TABLE_RANGE_END } |
| enum | InsertFlags { DB_INSERT_SEEK_NONE = 0, DB_INSERT_SEEK_NEW = _DB_INSERT_SEEK_NEW } |
| enum | RemoveFlags { DB_DELETE_SEEK_NONE = 0, DB_DELETE_SEEK_NEXT = _DB_DELETE_SEEK_NEXT, DB_DELETE_SEEK_PRIOR = _DB_DELETE_SEEK_PRIOR } |
Functions | |
| FieldTypeTag | _db_get_field_type (db_vartype_t type) |
| int | _db_get_field_def (FieldDesc *dst, const db_fielddef_t &src) |
| int | _db_get_field_def (db_fielddef_t *dst, const FieldDesc &src) |
| int | _db_get_table_def (TableDef *fds, const FieldDescSet &fields) |
| int | _db_get_index_def (IndexDef *dst, const FieldDescSet &fields, const IndexDesc &src) |
| int | _db_get_table_def (FieldDescSet *fields, IndexDescSet *indexes, const db_tabledef_t &def) |
| int | _db_get_field_data (db_row_t row, db_fieldno_t field, Value &value) |
| int | _db_set_field_data (db_row_t row, db_fieldno_t field, const Value &value) |
| int | _db_infer_cursor_mode (CursorMode cursor_mode) |
| db_seek_t | _db_infer_seek_relation (FieldRelation rel, Order order=DB_ASCENDING) |
| bool | _db_cn_equal (const NameChar *a, const NameChar *b) |
| bool | _db_cn_valid (const NameChar *src) |
| void | _db_cn_copy (NameChar *dst, const NameChar *src, size_t max_size) |
| void | _db_get_storage_config (db_file_storage_config_t *config, const StorageMode &mode) |
| void | _db_get_library_config (db_config_t *dbcfg, lm_config_t *lmcfg, const LibraryConfig &cfg) |
| void | _db_get_library_config (LibraryConfig *config, const db_config_t &dbcfg, const lm_config_t &lmcfg) |
| int | _db_validate_create (const FieldDescSet &fields, const IndexDescSet &indexes) |
| int | _db_validate_update (const FieldDescSet &new_fields, const IndexDescSet &new_indexes, const FieldDescSet &, const IndexDescSet &) |
| int | _db_infer_isolation (TxIsolation isolation) |
| FieldTypeTag | _db_get_field_type (db_coltype_t type) |
| int | _db_get_field_def (db_fielddef_t *, const FieldDesc *) |
Variables | |
| SetApiVer | supported_api_ver |
Concurrency modes | |
| const int | DB_SINGLE_PROCESS = _DB_SINGLE_PROCESS |
File open mode | |
| const int | DB_FILE_STORAGE = _DB_FILE_STORAGE |
Storage open flags | |
Store the database in memory. It will not persist when closed.
Store the database on a fixed-size raw device. Values for db::StorageMode::open_flags. | |
| const int | DB_READ_ONLY = _DB_READ_ONLY |
| const int | DB_NOLOGGING = _DB_NOLOGGING |
| const int | DB_NOLOCKING = _DB_NOLOCKING |
| const int | DB_UTF8_NAME = _DB_UTF8_NAME |