#include <ittia/dbxx/dbxx_table.h>

The Table class is used to access all data stored in a table. A Table object can be used to read rows one at a time, search for indexed data, and insert new rows.
Public Member Functions | |
| Table () | |
| Table (const Table &) | |
| const Table & | operator= (const Table &) |
| ~Table () | |
| Database * | get_database () const |
| virtual int | get_field (int, Value &) const |
| virtual int | set_field (int, const Value &) |
| Field | operator[] (int field) |
| Field | operator[] (const NameChar *) |
Table access | |
| int | create (Database &, const NameChar *table_name, const FieldDescSet &fields, const IndexDescSet &indexes, CursorMode=DB_CURSOR_FOR_READ, TxIsolation=DB_DEFAULT_ISOLATION) |
| int | open (Database &, const NameChar *table_name, CursorMode cursor_mode=DB_CURSOR_FOR_READ, TxIsolation=DB_DEFAULT_ISOLATION) |
| int | close () |
Settings | |
| TableMode | get_table_mode () const |
| void | set_insert_flags (InsertFlags) |
| InsertFlags | get_insert_flags () const |
| void | set_remove_flags (RemoveFlags) |
| RemoveFlags | get_remove_flags () const |
Field access | |
| virtual const FieldDescSet * | field_desc () const |
| virtual const IndexDescSet * | index_desc () const |
Row write operations | |
| virtual int | insert () |
| virtual int | edit () |
| virtual int | post () |
| virtual int | cancel () |
| virtual int | remove () |
Row positioning operations | |
| virtual int | seek_first () |
| virtual int | seek_last () |
| virtual int | seek_next () |
| virtual int | seek_prior () |
Row position tests | |
| virtual bool | is_bof () const |
| virtual bool | is_eof () const |
| virtual bool | is_opened () const |
Row search positioning | |
| int | set_sort_order (const NameChar *index, Order order=DB_ASCENDING, CursorMode=DB_CURSOR_FOR_READ, TxIsolation=DB_DEFAULT_ISOLATION) |
| int | begin_seek (FieldRelation relation) |
| int | apply_seek () |
Range matching | |
| int | set_range_start () |
| int | set_range_end () |
| int | apply_range () |
| int | clear_range () |
Bookmarks | |
| int | refresh () |
| RowId | get_row_id () |
| TableId | get_table_id () |
| int | seek (RowId &) |
Locks | |
| int | lock_row (const RowId &, ObjectLockMode) |
| int | lock_row (ObjectLockMode) |
| int | lock_row (ObjectLock &, const RowId &, ObjectLockMode) |
| int | lock_row (ObjectLock &, ObjectLockMode) |
Row position tests | |
| bool | is_empty () const |
Field information | |
| virtual int | find_field (const NameChar *) const |
| virtual int | get_field_count () const |
| virtual FieldTypeTag | get_field_type (int) const |
| virtual bool | is_nullable (int) const |
| virtual int | get_field_desc (int, FieldDesc &) |
Null state | |
| virtual bool | is_null (int) |
| virtual int | set_null (int) |
BLOB access | |
| virtual db_len_t | read_blob (int field, db_len_t offset, void *data, db_len_t) |
| virtual db_len_t | write_blob (int field, db_len_t offset, const void *data, db_len_t) |
| virtual db_len_t | write_blob_final (int field, db_len_t offset, const void *data, db_len_t) |
| virtual int | truncate_blob (int field, db_len_t size) |
| virtual db_len_t | get_blob_size (int field) |
Untyped access | |
| int | get_field (const NameChar *name, Value &) const |
| int | set_field (const NameChar *name, const Value &) |
Direct typed access | |
| virtual int | get_field (int, int8_t &) |
| virtual int | get_field (int, uint8_t &) |
| virtual int | get_field (int, int16_t &) |
| virtual int | get_field (int, uint16_t &) |
| virtual int | get_field (int, int32_t &) |
| virtual int | get_field (int, uint32_t &) |
| virtual int | get_field (int, int64_t &) |
| virtual int | get_field (int, uint64_t &) |
| virtual int | get_field (int, db_float32_t &) |
| virtual int | get_field (int, db_float64_t &) |
| virtual int | get_field (int, Currency &) |
| virtual int | get_field (int, DateTime &) |
| virtual int | get_field (int, db_ansi_t *, int len) |
| virtual int | get_field (int, db_utf8_t *, int len) |
| virtual int | get_field (int, db_utf16_t *, int len) |
| virtual int | get_field (int, db_utf32_t *, int len) |
| virtual int | set_field (int, int8_t) |
| virtual int | set_field (int, uint8_t) |
| virtual int | set_field (int, int16_t) |
| virtual int | set_field (int, uint16_t) |
| virtual int | set_field (int, int32_t) |
| virtual int | set_field (int, uint32_t) |
| virtual int | set_field (int, int64_t) |
| virtual int | set_field (int, uint64_t) |
| virtual int | set_field (int, db_float32_t) |
| virtual int | set_field (int, db_float64_t) |
| virtual int | set_field (int, const Currency &) |
| virtual int | set_field (int, const DateTime &) |
| virtual int | set_field (int, const db_ansi_t *, int len) |
| virtual int | set_field (int, const db_utf8_t *, int len) |
| virtual int | set_field (int, const db_utf16_t *, int len) |
| virtual int | set_field (int, const db_utf32_t *, int len) |
std::string typed access | |
| int | get_field (int, DB_STL string &) |
| int | get_field (int, DB_STL wstring &) |
| int | set_field (int, const DB_STL string &) |
| int | set_field (int, const DB_STL wstring &) |
MFC CString typed access | |
| int | get_field (int, DB_MFC CString &) |
| int | set_field (int, const DB_MFC CString &) |
wchar_t typed access | |
| int | get_wchar_field (int field, wchar_t *buf, int max_len) |
| int | set_wchar_field (int, const wchar_t *, int len) |
Protected Types | |
| enum | { RAPERM_OPENED = 1, RAPERM_SET_FIELD = 2, RAPERM_GET_FIELD = 4, RAPERM_GET_BLOB = 8, RAPERM_SET_BLOB = 16 } |
| enum | { BITMAP_SIZE = 8 } |
Protected Member Functions | |
| void | reset_bitmap () |
| void | set_bit (int) |
| bool | get_bit (int nth) |
| void | clear_row () |
| void | set_perm (unsigned perm) |
| int | attach_cursor (db_cursor_t cursor, db_row_t cur_row) |
| void | detach_cursor () |
| db_cursor_t | get_cursor () const |
| db_row_t | get_row () const |
Protected Attributes | |
| db_cursor_t | cursor |
| db_row_t | cur_row |
| db_row_t | blob_row |
| unsigned | _ra_perm |
| uint32_t | _bitmap [BITMAP_SIZE] |