Harlinn.Windows 0.1
|
#include <HCCEse.h>
Public Types | |
using | ColumnId = JET_COLUMNID |
Public Member Functions | |
constexpr | Table () noexcept |
This constructor is used to create a Table object that is not initially referencing an existing ESE table cursor. | |
Table (JET_SESID sessionId, JET_TABLEID tableId) | |
Used to initialize a Table object that references an ESE table cursor. | |
~Table () | |
The destructor closes the ESE table cursor. | |
Table (const Table &other)=delete | |
Table (Table &&other) noexcept | |
Move constructor. | |
Table & | operator= (const Table &other)=delete |
Table & | operator= (Table &&other) noexcept |
Move assignment. | |
JET_TABLEID | Handle () const |
Returns the handle to the database table cursor. | |
bool | IsValid () const noexcept |
Checks that both sessionId_ and tableId_ are not assigned their nil values. | |
operator bool () const noexcept | |
Checks that both sessionId_ and tableId_ are not assigned their nil values. | |
JET_SESID | SessionHandle () const |
Returns the handle to the session used to create or open the table cursor. | |
void | OnTableOpened () |
This function is called from Database::OpenTable allowing derived types to perform additional operations after the object is fully created. | |
void | OnTableCreated () |
This function is called from Database::CreateTable allowing derived types to perform additional operations after the object is fully created. | |
void | MakeKey (const void *keyData, unsigned long keyDataLength, KeyFlags flags=KeyFlags::None) const |
template<DirectType T> | |
void | MakeKey (const T &keyData, KeyFlags flags=KeyFlags::None) const |
void | MakeKey (const DateTime &dateTime, KeyFlags flags=KeyFlags::None) const |
void | MakeKey (const std::chrono::system_clock::time_point &time_point, KeyFlags flags=KeyFlags::None) const |
void | MakeKey (bool value, KeyFlags flags=KeyFlags::None) const |
template<SimpleCharSpanLike T> | |
void | MakeKey (const T &value, KeyFlags flags=KeyFlags::None) const |
template<SimpleByteSpanLike T> | |
void | MakeKey (const T &value, KeyFlags flags=KeyFlags::None) const |
void | MakeKey (const char *value, KeyFlags flags=KeyFlags::None) const |
void | MakeKey (const wchar_t *value, KeyFlags flags=KeyFlags::None) const |
void | SetIndexRange (IndexRangeFlags flags=Ese::IndexRangeFlags::None) const |
Temporarily limits the set of index entries that the cursor can walk using Table::Move to those starting from the current index entry and ending at the index entry that matches the search criteria specified by the search key in that cursor and the specified bound criteria. A search key must have been previously constructed using Table::MakeKey. | |
void | RetrieveKey (void *keyData, unsigned long maxKeyDataLength, unsigned long *actualKeyDataLength, bool retrieveCopyOfSearchKey=true) const |
template<BinaryLike BinaryT> | |
BinaryT | RetrieveKey (bool retrieveCopyOfSearchKey=true) const |
void | SetCurrentIndex (const wchar_t *indexName) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
void | SetCurrentIndex (const char *indexName) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
template<SimpleStringLike T> | |
void | SetCurrentIndex (const T &indexName) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
bool | SetCurrentIndex (const wchar_t *indexName, SetCurrentIndexFlags flags) const |
Sets the current index of a cursor that defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
bool | SetCurrentIndex (const char *indexName, SetCurrentIndexFlags flags) const |
Sets the current index of a cursor that defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
template<SimpleStringLike T> | |
bool | SetCurrentIndex (const T &indexName, SetCurrentIndexFlags flags) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
bool | SetCurrentIndex (const wchar_t *indexName, SetCurrentIndexFlags flags, unsigned long itagSequence) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
bool | SetCurrentIndex (const char *indexName, SetCurrentIndexFlags flags, unsigned long itagSequence) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
template<SimpleStringLike T> | |
bool | SetCurrentIndex (const T &indexName, SetCurrentIndexFlags flags, unsigned long itagSequence) const |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records. | |
Ese::Result | Seek (SeekFlags flags) const |
Efficiently positions a cursor to an index entry that matches the search criteria specified by the search key in that cursor and the specified inequality. A search key must have been previously constructed using Table::MakeKey. | |
template<BinaryLike T> | |
void | GetBookmark (T &result) const |
Retrieves the bookmark for the record that is associated with the index entry at the current position of a cursor. This bookmark can then be used to reposition that cursor back to the same record using Table::GoToBookmark. | |
template<SimpleByteSpanLike T> | |
bool | GotoBookmark (const T &bookmark) const |
Positions the cursor to an index entry for the record that is associated with the specified bookmark. The bookmark can be used with any index defined over a table. The bookmark for a record can be retrieved using Table::GetBookmark. | |
bool | Move (long offset, bool moveKeyNE=false) const |
Positions a cursor at the start or end of an index and traverses the entries in that index either forward or backward. It is also possible to move the cursor forward or backward on the current index by a specified number of index entries. Another approach is to artificially limit the index entries that can be enumerated using Move by setting up an index range on the cursor using Table::SetIndexRange. | |
bool | MoveFirst () const |
Moves the cursor to the first index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange. | |
bool | MoveNext () const |
Moves the cursor to the next index entry in the index (if one exists). This value is exactly equal to an ordinary offset of +1. It respects index ranges set with Table::SetIndexRange. | |
bool | MovePrevious () const |
Moves the cursor to the previous index entry in the index (if one exists). This value is exactly equal to an ordinary offset of -1. It respects index ranges set with Table::SetIndexRange. | |
bool | MoveLast () const |
Moves the cursor to the last index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange. | |
bool | IsPositioned () const |
The cursor remains at the current logical position and the existence of the index entry that corresponds to that logical position will be tested. | |
Ese::Result | RetrieveColumn (JET_COLUMNID columnId, void *dataBuffer, unsigned long dataBufferSize, unsigned long *actualDataSize, RetrieveFlags retrieveFlags, JET_RETINFO *pretinfo=nullptr) const |
Retrieves a single column value from the current record. The record is that record associated with the index entry at the current position of the cursor. Alternatively, this function can retrieve a column from a record being created in the cursor copy buffer. This function can also retrieve column data from an index entry that references the current record. In addition to retrieving the actual column value, Table::RetrieveColumn can also be used to retrieve the size of a column, before retrieving the column data itself so that application buffers can be sized appropriately. | |
unsigned long | RetrieveColumnSize (JET_COLUMNID columnId, int itagSequence, RetrieveFlags retrieveFlags=RetrieveFlags::Tag) const |
Retrieves the size of the data stored in a multi-valued column. | |
unsigned long | RetrieveColumnSize (JET_COLUMNID columnId, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Retrieves the size of the data stored in a column. | |
bool | IsDBNull (JET_COLUMNID columnId, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Tests if the data stored in a column in NULL. | |
template<typename RetrieveColumnT > requires ( std::is_base_of_v< JET_RETRIEVECOLUMN, RetrieveColumnT> || std::is_base_of_v< Ese::RetrieveColumn, RetrieveColumnT> ) && ( sizeof( RetrieveColumnT ) == sizeof( JET_RETRIEVECOLUMN ) ) | |
Ese::Result | RetrieveColumns (RetrieveColumnT *retrieveColumns, unsigned long columnCount) const |
template<SimpleSpanLike SpanT> requires (std::is_base_of_v< JET_RETRIEVECOLUMN, typename SpanT::value_type> || std::is_base_of_v< Ese::RetrieveColumn, typename SpanT::value_type>) && (sizeof( typename SpanT::value_type ) == sizeof( JET_RETRIEVECOLUMN )) | |
Ese::Result | RetrieveColumns (SpanT &retrieveColumns) const |
Retrieves multiple column values from the current record in a single operation. An array of JET_RETRIEVECOLUMN structures or Ese::RetrieveColumn objects is used to describe the set of column values to be retrieved, and to describe output buffers for each column value to be retrieved. | |
void | SetColumn (JET_COLUMNID columnId, const void *dataBuffer, unsigned long dataBufferSize, SetFlags flags, JET_SETINFO *psetinfo) const |
Modifies a single column value in a modified record to be inserted or to update the current record. It can overwrite an existing value, add a new value to a sequence of values in a multi-valued column, remove a value from a sequence of values in a multi-valued column, or update all or part of a long value, a column of type ColumnType::LongBinary or ColumnType::LongText. | |
template<typename SetColumnT > requires ( std::is_base_of_v< JET_SETCOLUMN, SetColumnT> || std::is_base_of_v< Ese::SetColumn, SetColumnT> ) && ( sizeof( SetColumnT ) == sizeof( JET_SETCOLUMN ) ) | |
void | SetColumns (SetColumnT *setColumns, unsigned long count) const |
Set multiple column values in a single operation. An array of JET_SETCOLUMN structures, or Ese::SetColumn objects, is used to describe the set of column values to be set, and to describe input buffers for each column value to be set. | |
template<SimpleSpanLike SpanT> requires (std::is_base_of_v< JET_SETCOLUMN, typename SpanT::value_type> || std::is_base_of_v< Ese::SetColumn, typename SpanT::value_type>) && (sizeof( typename SpanT::value_type ) == sizeof( JET_SETCOLUMN )) | |
void | SetColumns (SpanT &setColumns) const |
Set multiple column values in a single operation. An array of JET_SETCOLUMN structures, or Ese::SetColumn objects, is used to describe the set of column values to be set, and to describe input buffers for each column value to be set. | |
void | GetTableColumnInfo (const wchar_t *columnName, void *resultData, unsigned long resultDataSize, ColumnInfoLevel columnInfoFlags) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const char *columnName, void *resultData, unsigned long resultDataSize, ColumnInfoLevel columnInfoFlags) const |
Retrieves information about a table column. | |
template<SimpleStringLike StringT> | |
void | GetTableColumnInfo (const StringT &columnName, void *resultData, unsigned long resultDataSize, ColumnInfoLevel columnInfoFlags) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const wchar_t *columnName, JET_COLUMNDEF &data) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const wchar_t *columnName, JET_COLUMNBASE_W &data) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const wchar_t *columnName, JET_COLUMNLIST &data) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const char *columnName, JET_COLUMNDEF &data) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const char *columnName, JET_COLUMNBASE_A &data) const |
Retrieves information about a table column. | |
void | GetTableColumnInfo (const char *columnName, JET_COLUMNLIST &data) const |
Retrieves information about a table column. | |
template<SimpleStringLike StringT> | |
void | GetTableColumnInfo (const StringT &columnName, JET_COLUMNDEF &data) const |
Retrieves information about a table column. | |
template<SimpleStringLike StringT, typename ColumnBaseT > requires (SimpleWideStringLike<StringT> && std::is_same_v<ColumnBaseT, JET_COLUMNBASE_W> ) || ( SimpleAnsiStringLike<StringT> && std::is_same_v<ColumnBaseT, JET_COLUMNBASE_A> ) | |
void | GetTableColumnInfo (const StringT &columnName, ColumnBaseT &data) const |
Retrieves information about a table column. | |
template<SimpleStringLike StringT> | |
void | GetTableColumnInfo (const StringT &columnName, JET_COLUMNLIST &data) const |
Retrieves information about a table column. | |
template<StringLike StringT> | |
ColumnList< StringT > | GetColumns () const |
Retrieves information about the columns of a table. | |
void | PrepareUpdate (PrepareUpdateOptions option) const |
The PrepareUpdate function is the first operation in performing an update, for the purposes of inserting a new record or replacing an existing record with new values. Updates are done by calling Table::PrepareUpdate, then calling Table::SetColumn or Table::SetColumns zero or more times and finally by calling Table::Store to complete the operation. Table::PrepareUpdate and Table::Store set the boundaries for an update operation and are important in having only the final update state of a record entered into indexes. This is both more efficient, but also required in cases where data must match a valid state through more than on set column operation. | |
void | Cancel () const |
Cancels the current update for this cursor. | |
void | Copy () const |
Prepares the cursor for an insert of a copy of the existing record. There must be a current record if this option is used. The initial state of the new record is copied from the current record. Long values that are stored off-record are virtually copied. | |
void | Insert () const |
Prepares the cursor for an insert of a new record. All the data is initialized to the default state for the record. If the table has an auto-increment column, then a new value is assigned to this record regardless of whether the update ultimately succeeds, fails or is cancelled. | |
void | Replace () const |
Prepares the cursor for a replace of the current record. If the table has a version column, then the version column is set to the next value in its sequence. If this update does not complete, then the version value in the record will be unaffected. An update lock is taken on the record to prevent other sessions from updating this record before this session completes. | |
void | InsertCopyDeleteOriginal () const |
Prepares the cursor for an insert of the same record, and a delete or the original record. It is used in cases in which the primary key has changed. | |
void | Store () const |
Performs an update operation including inserting a new row into a table or updating an existing row. | |
Int32 | EscrowUpdate (__in JET_COLUMNID columnId, Int32 addendum, __in bool escrowNoRollback=false) |
Performs an atomic addition operation on one column. This function allows multiple sessions to update the same record concurrently without conflicts. | |
void | Delete () const |
Deletes the current record in a table. | |
void | SetSequential (SequentialFlags flags=SequentialFlags::PrereadForward) const |
The SetSequential function notifies the database engine that the application is scanning the entire current index that contains a given cursor. Consequently, the methods that are used to access the index data will be tuned to make this scenario as fast as possible. | |
template<ApiCharType T> | |
JET_COLUMNID | GetColumnId (const T *columnName) |
Retrieves the column id for the column identified by the columnName argument. | |
template<SimpleStringLike T> | |
JET_COLUMNID | GetColumnId (const T &columnName) |
Retrieves the column id for the column identified by the columnName argument. | |
JET_COLUMNID | AddColumn (const wchar_t *columnName, const JET_COLUMNDEF &columnDef, const void *defaultValueBuffer=nullptr, unsigned long defaultValueBufferSize=0) const |
Adds a new column to an existing table in an ESE database. | |
JET_COLUMNID | AddColumn (const char *columnName, const JET_COLUMNDEF &columnDef, const void *defaultValueBuffer=nullptr, unsigned long defaultValueBufferSize=0) const |
Adds a new column to an existing table in an ESE database. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddColumn (const T &columnName, const JET_COLUMNDEF &columnDef, const void *defaultValueBuffer=nullptr, unsigned long defaultValueBufferSize=0) const |
Adds a new column to an existing table in an ESE database. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddBoolean (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a boolean column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddBoolean (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a boolean column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddSByte (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a SByte column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddSByte (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a SByte column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddByte (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a Byte column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddByte (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds a Byte column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddInt16 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int16 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddInt16 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int16 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddUInt16 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt16 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddUInt16 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt16 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddInt32 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int32 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddInt32 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int32 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddUInt32 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt32 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddUInt32 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt32 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddInt64 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int64 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddInt64 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Int64 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddUInt64 (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt64 column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddUInt64 (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an UInt64 column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddSingle (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an single precision floating point column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddSingle (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an single precision floating point column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddDouble (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an double precision floating point column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddDouble (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an double precision floating point column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddCurrency (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Currency column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddCurrency (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Currency column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddTimeSpan (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
template<ApiCharType T> | |
JET_COLUMNID | AddTimeSpan (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
template<SimpleStringLike T> | |
JET_COLUMNID | AddDateTime (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an DateTime column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddDateTime (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an DateTime column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddGuid (const T &columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Guid/uuid column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddGuid (const T *columnName, ColumnFlags flags=ColumnFlags::Fixed|ColumnFlags::NotNULL) const |
Adds an Guid/uuid column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddText (const T *columnName, unsigned long maxSize=127, short codePage=1200, ColumnFlags flags=ColumnFlags::NotNULL) const |
Adds an text column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddText (const T &columnName, unsigned long maxSize=127, short codePage=1200, ColumnFlags flags=ColumnFlags::NotNULL) const |
Adds an text column to the table. | |
template<ApiCharType T> | |
JET_COLUMNID | AddBinary (const T *columnName, unsigned long maxSize=255, ColumnFlags flags=ColumnFlags::NotNULL) const |
Adds an binary column to the table. | |
template<SimpleStringLike T> | |
JET_COLUMNID | AddBinary (const AnsiString &columnName, unsigned long maxSize=255, ColumnFlags flags=ColumnFlags::NotNULL) const |
Adds an binary column to the table. | |
void | SetNull (JET_COLUMNID columnid) const |
Sets the column identified by columnId to NULL. | |
template<DirectType T> | |
bool | Read (JET_COLUMNID columnId, T &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads the column value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
bool | Read (JET_COLUMNID columnId, bool &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a bool value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
bool | Read (JET_COLUMNID columnId, DateTime &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a DateTime value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
bool | Read (JET_COLUMNID columnId, std::chrono::system_clock::time_point &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a std::chrono::system_clock::time_point value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
template<StringLike T> | |
bool | Read (JET_COLUMNID columnId, T &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a text value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
template<BinaryLike T> | |
bool | Read (JET_COLUMNID columnId, T &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a binary value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
bool | Read (JET_COLUMNID columnId, IO::MemoryStream &value, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads a binary value, into a IO::MemoryStream, from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL. | |
template<typename T > | |
std::optional< T > | As (JET_COLUMNID columnId, RetrieveFlags flags=RetrieveFlags::None) const |
Reads the column value from the column identified by columnId, returning std::optional<T>. | |
template<DirectType T> | |
void | SetColumn (JET_COLUMNID columnid, const T &value, SetFlags flags=SetFlags::None) const |
Sets the value of a column identified by column id. | |
template<typename T > requires std::is_same_v<DateTime, T> | |
void | SetColumn (JET_COLUMNID columnid, const T &value, SetFlags flags=SetFlags::None) const |
Sets the DateTime value of a column identified by column id. | |
template<typename T > requires std::is_same_v<std::chrono::system_clock::time_point, T> | |
void | SetColumn (JET_COLUMNID columnid, const T &value, SetFlags flags=SetFlags::None) const |
Sets the std::chrono::system_clock::time_point value of a column identified by column id. | |
template<typename T > requires std::is_same_v<bool, T> | |
void | SetColumn (JET_COLUMNID columnid, T value, SetFlags flags=SetFlags::None) const |
Sets the bool value of a column identified by column id. | |
template<SimpleCharSpanLike T> | |
void | SetColumn (JET_COLUMNID columnId, const T &text, SetFlags flags=SetFlags::None) const |
Sets the text value of a column identified by column id. | |
template<SimpleByteSpanLike T> | |
void | SetColumn (JET_COLUMNID columnId, const T &value, SetFlags flags=SetFlags::None) const |
Sets the binary value of a column identified by column id. | |
Ese::Result | ReadBinary (JET_COLUMNID columnId, void *data, unsigned long dataSize, unsigned long columnOffset, unsigned long &actualDataSize, RetrieveFlags retrieveFlags=RetrieveFlags::None) const |
Reads binary data from a column of type ColumnType::LongBinary. | |
void | WriteBinary (JET_COLUMNID columnid, const void *data, unsigned long dataSize, unsigned long columnOffset, SetFlags flags=SetFlags::None) const |
Writes binary data to a column of type ColumnType::LongBinary. | |
void | CreateIndex (const wchar_t *indexName, IndexFlags indexFlags, const wchar_t *keyString, unsigned long keyStringLength, unsigned long density=95) const |
Creates an index for the table. | |
void | CreateIndex (const char *indexName, IndexFlags indexFlags, const char *keyString, unsigned long keyStringLength, unsigned long density=95) const |
Creates an index for the table. | |
template<SimpleStringLike T> | |
void | CreateIndex (const T &indexName, IndexFlags indexFlags, const typename T::value_type *keyString, unsigned long keyStringLength, unsigned long density=95) const |
Creates an index for the table. | |
template<SimpleStringLike T, SimpleCharSpanLike SpanT> requires std::is_same_v<typename T::value_type, typename SpanT::value_type > | |
void | CreateIndex (const T &indexName, IndexFlags indexFlags, const SpanT &keyString, unsigned long density=95) const |
Creates an index for the table. | |
void | Close () |
Closes an open table in a database. The table may be a temporary table or a normal table. | |
Static Private Member Functions | |
static bool | CheckReadResult (Result rc) |
Private Attributes | |
JET_SESID | sessionId_ |
JET_TABLEID | tableId_ |
Friends | |
class | Database |
The Table class manages a handle to a database cursor that is used to call to the JET API. A cursor can only be used with the session that was used to open that cursor.
A cursor manages the use of a table for the database engine. A cursor can do the following tasks:
The supported functionality of the cursor might change as the status or type of the underlying table changes. For example, a temporary table might disallow searching for data when it is opened with certain options.
The cursor is always fully connected to the underlying table and interacts with that data directly without any caching. Almost all of the core ISAM functionality that is exposed by this database engine is works through the cursor.
using Harlinn::Common::Core::Ese::Table::ColumnId = JET_COLUMNID |
|
inlineconstexprnoexcept |
This constructor is used to create a Table object that is not initially referencing an existing ESE table cursor.
|
inline |
Used to initialize a Table object that references an ESE table cursor.
sessionId | |
tableId |
|
inline |
The destructor closes the ESE table cursor.
|
delete |
|
inlinenoexcept |
Move constructor.
other | The Table object that is moved to the new object. |
|
inline |
Adds an binary column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
maxSize | |
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an binary column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
maxSize | |
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a boolean column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a boolean column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a Byte column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a Byte column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a new column to an existing table in an ESE database.
columnName | The name of the column to add. The name must meet the following criteria:
|
columnDef | A const reference to a JET_COLUMNDEF structure. |
defaultValueBuffer | A pointer to a buffer that contains the default value for the column. The length of the buffer is defaultValueBufferSize. If there is no default, set defaultValueBuffer to nullptr and defaultValueBufferSize to zero. Default values cannot be larger than JET_cbColumnMost bytes for fixed columns or JET_cbLVDefaultValueMost bytes for long values. If a default value is larger than that, it will be silently truncated. If the grbit field of the JET_COLUMNDEF structure has ColumnFlags::UserDefinedDefault set, defaultValueBuffer will be interpreted as a pointer to a JET_USERDEFINEDDEFAULT structure. |
defaultValueBufferSize | The size, in bytes, of the buffer that is specified in defaultValueBuffer. |
|
inline |
Adds a new column to an existing table in an ESE database.
columnName | The name of the column to add. The name must meet the following criteria:
|
columnDef | A const reference to a JET_COLUMNDEF structure. |
defaultValueBuffer | A pointer to a buffer that contains the default value for the column. The length of the buffer is defaultValueBufferSize. If there is no default, set defaultValueBuffer to nullptr and defaultValueBufferSize to zero. Default values cannot be larger than JET_cbColumnMost bytes for fixed columns or JET_cbLVDefaultValueMost bytes for long values. If a default value is larger than that, it will be silently truncated. If the grbit field of the JET_COLUMNDEF structure has ColumnFlags::UserDefinedDefault set, defaultValueBuffer will be interpreted as a pointer to a JET_USERDEFINEDDEFAULT structure. |
defaultValueBufferSize | The size, in bytes, of the buffer that is specified in defaultValueBuffer. |
|
inline |
Adds a new column to an existing table in an ESE database.
columnName | The name of the column to add. The name must meet the following criteria:
|
columnDef | A const reference to a JET_COLUMNDEF structure. |
defaultValueBuffer | A pointer to a buffer that contains the default value for the column. The length of the buffer is defaultValueBufferSize. If there is no default, set defaultValueBuffer to nullptr and defaultValueBufferSize to zero. Default values cannot be larger than JET_cbColumnMost bytes for fixed columns or JET_cbLVDefaultValueMost bytes for long values. If a default value is larger than that, it will be silently truncated. If the grbit field of the JET_COLUMNDEF structure has ColumnFlags::UserDefinedDefault set, defaultValueBuffer will be interpreted as a pointer to a JET_USERDEFINEDDEFAULT structure. |
defaultValueBufferSize | The size, in bytes, of the buffer that is specified in defaultValueBuffer. |
|
inline |
Adds an Currency column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Currency column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an DateTime column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an DateTime column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an double precision floating point column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an double precision floating point column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Guid/uuid column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Guid/uuid column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int16 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int16 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int32 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int32 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int64 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an Int64 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a SByte column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds a SByte column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an single precision floating point column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an single precision floating point column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an text column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
maxSize | |
codePage | |
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an text column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
maxSize | |
codePage | |
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an TimeSpan column to the table.
ESE doesn't have a TimeSpan/duration type, this is an alias for an Int64 column.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an TimeSpan column to the table.
ESE doesn't have a TimeSpan/duration type, this is an alias for an Int64 column.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt16 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt16 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt32 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt32 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt64 column to the table.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Adds an UInt64 column to the table.
T | Either char or wchar_t. |
columnName | The name of the column to add. The name must meet the following criteria:
|
flags | One or more values from the ColumnFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads the column value from the column identified by columnId, returning std::optional<T>.
T | Any type for which there exists a Read overload. |
columnId | The column id identifying the column. |
flags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Cancels the current update for this cursor.
|
inlinestaticprivate |
|
inline |
Closes an open table in a database. The table may be a temporary table or a normal table.
|
inline |
Prepares the cursor for an insert of a copy of the existing record. There must be a current record if this option is used. The initial state of the new record is copied from the current record. Long values that are stored off-record are virtually copied.
|
inline |
Creates an index for the table.
indexName | A pointer to a null-terminated string that specifies the name of the index to be created. The index name must conform to the following guidelines:
|
indexFlags | Zero or more values from the IndexFlags enumeration. The values can be combined using the | operator. |
keyString | A pointer to a double null-terminated string of null-delimited tokens. |
keyStringLength | The length, in charactes, of the keyString parameter, including the two terminating null characters. |
density | The percentage density of the initial index B+ tree. |
|
inline |
Creates an index for the table.
indexName | A string that specifies the name of the index to be created. The index name must conform to the following guidelines:
|
indexFlags | Zero or more values from the IndexFlags enumeration. The values can be combined using the | operator. |
keyString | A double null-terminated string of null-delimited tokens. |
density | The percentage density of the initial index B+ tree. |
|
inline |
Creates an index for the table.
indexName | A string that specifies the name of the index to be created. The index name must conform to the following guidelines:
|
indexFlags | Zero or more values from the IndexFlags enumeration. The values can be combined using the | operator. |
keyString | A pointer to a double null-terminated string of null-delimited tokens. |
keyStringLength | The length, in charactes, of the keyString parameter, including the two terminating null characters. |
density | The percentage density of the initial index B+ tree. |
|
inline |
Creates an index for the table.
indexName | A pointer to a null-terminated string that specifies the name of the index to be created. The index name must conform to the following guidelines:
|
indexFlags | Zero or more values from the IndexFlags enumeration. The values can be combined using the | operator. |
keyString | A pointer to a double null-terminated string of null-delimited tokens. |
keyStringLength | The length, in charactes, of the keyString parameter, including the two terminating null characters. |
density | The percentage density of the initial index B+ tree. |
|
inline |
Deletes the current record in a table.
|
inline |
Performs an atomic addition operation on one column. This function allows multiple sessions to update the same record concurrently without conflicts.
columnId | The column id of the column to be updated. This column must have a column type of ColumnType::Long with the ColumnFlags::EscrowUpdate bit set. |
addendum | The addend for the column. |
escrowNoRollback | If true, then even if the session performing the escrow update has its transaction rollback this update will not be undone, otherwise false. Note that as the log records may not be flushed to disk, recent escrow updates done with this flag may be lost if there is a crash. |
|
inline |
Retrieves the bookmark for the record that is associated with the index entry at the current position of a cursor. This bookmark can then be used to reposition that cursor back to the same record using Table::GoToBookmark.
T | Any type that matches the BinaryLike concept. |
result | A reference to a variable that receives the bookmark. |
|
inline |
Retrieves the column id for the column identified by the columnName argument.
T | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to retrieve the column id for. |
|
inline |
Retrieves the column id for the column identified by the columnName argument.
T | Either char or wchar_t |
columnName | The name of the column to retrieve the column id for. |
|
inline |
Retrieves information about the columns of a table.
StringT | Any type that matches the SimpleStringLike concept. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNBASE_A object. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNDEF object. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNLIST object. A temporary table is opened and is identified by the tableid member of JET_COLUMNLIST. The table must be closed with JetCloseTable. If this function fails, the structure contains undefined data. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
resultData | Pointer to a buffer that will receive the information. The type of the buffer is dependent on columnInfoFlags. The caller must be configured to align the buffer appropriately. |
resultDataSize | The size, in bytes, of the buffer that was passed in resultData. |
columnInfoFlags | A value from the ColumnInfoLevel enumeration. |
|
inline |
Retrieves information about a table column.
ColumnBaseT | Either JET_COLUMNBASE_W or JET_COLUMNBASE_A. |
StringT | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNBASE_W or JET_COLUMNBASE_A object. |
|
inline |
Retrieves information about a table column.
StringT | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNDEF object. |
|
inline |
Retrieves information about a table column.
StringT | Any type that matches the SimpleStringLike concept. |
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNLIST object. A temporary table is opened and is identified by the tableid member of JET_COLUMNLIST. The table must be closed with JetCloseTable. If this function fails, the structure contains undefined data. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
StringT | Any type that matches the SimpleStringLike concept. |
resultData | Pointer to a buffer that will receive the information. The type of the buffer is dependent on columnInfoFlags. The caller must be configured to align the buffer appropriately. |
resultDataSize | The size, in bytes, of the buffer that was passed in resultData. |
columnInfoFlags | A value from the ColumnInfoLevel enumeration. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNBASE_W object. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNDEF object. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
data | A reference to a JET_COLUMNLIST object. A temporary table is opened and is identified by the tableid member of JET_COLUMNLIST. The table must be closed with JetCloseTable. If this function fails, the structure contains undefined data. |
|
inline |
Retrieves information about a table column.
columnName | The name of the column to fetch information for. |
resultData | Pointer to a buffer that will receive the information. The type of the buffer is dependent on columnInfoFlags. The caller must be configured to align the buffer appropriately. |
resultDataSize | The size, in bytes, of the buffer that was passed in resultData. |
columnInfoFlags | A value from the ColumnInfoLevel enumeration. |
|
inline |
Positions the cursor to an index entry for the record that is associated with the specified bookmark. The bookmark can be used with any index defined over a table. The bookmark for a record can be retrieved using Table::GetBookmark.
T | A type that matches the SimpleByteSpanLike concept. |
bookmark | A const reference to the variable containing the bookmark to go to. |
|
inline |
Returns the handle to the database table cursor.
|
inline |
Prepares the cursor for an insert of a new record. All the data is initialized to the default state for the record. If the table has an auto-increment column, then a new value is assigned to this record regardless of whether the update ultimately succeeds, fails or is cancelled.
|
inline |
Prepares the cursor for an insert of the same record, and a delete or the original record. It is used in cases in which the primary key has changed.
|
inline |
Tests if the data stored in a column in NULL.
columnId | The column id of the column to retrieve. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must not include RetrieveFlags::Tag. |
|
inline |
The cursor remains at the current logical position and the existence of the index entry that corresponds to that logical position will be tested.
|
inlinenoexcept |
Checks that both sessionId_ and tableId_ are not assigned their nil values.
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
dateTime | A boolean value the column data for the current key column of the current index of the cursor for which the search key is being constructed. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
value | A pointer to a zero terminated c style char string. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
dateTime | A const reference to a DateTime containing the column data for the current key column of the current index of the cursor for which the search key is being constructed. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
T |
keyData | A const reference to a variable containing the column data for the current key column of the current index of the cursor for which the search key is being constructed. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
T | Any type that matches the SimpleCharSpanLike concept. |
value | A const reference to a variable containing the column data for the current key column of the current index of the cursor for which the search key is being constructed. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
T | Any type that matches the SimpleByteSpanLike concept. |
value | A const reference to a variable containing the column data for the current key column of the current index of the cursor for which the search key is being constructed. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor. It is also possible to load a previously constructed search key that has been retrieved from the cursor using RetrieveKey.
keyData | The input buffer containing the column data for the current key column of the current index of the cursor for which the search key is being constructed. The data type of the column data in the input buffer must exactly match the data type and other properties of the column definition of the current key column. No type coercion is performed on the column data whatsoever. If KeyFlags::NormalizedKey is specified in the flags parameter, the input buffer must contain a previously constructed search key. Such keys are obtained using a call to Table::RetrieveKey. |
keyDataLength | The size in bytes of the column data provided in the input buffer. If KeyFlags::NormalizedKey is specified in the flags parameter, this is the size of the search key provided in the input buffer If the size of the column data is zero then the contents of the input buffer are ignored. If KeyFlags::DataZeroLength is specified in the flags parameter and the current key column of the current index of the cursor is a variable length column, the input column data is presumed to be a zero length value. Otherwise, the input column data is presumed to be a NULL value. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
MakeKey constructs search keys that are used to find a set of entries in an index by some simple search criteria on their key column values.
A search key is also one of the intrinsic properties of a cursor and is used by the Seek and SetIndexRange methods to locate index entries matching these search criteria on the current index of that cursor.
A complete search key is built up in a series of MakeKey calls where each call is used to load the column value for the next key column of the current index of a cursor.
value | A pointer to a zero terminated c style wchar_t string. |
flags | Zero or more values from the KeyFlags enumeration. The values can be combined using the | operator. |
|
inline |
Positions a cursor at the start or end of an index and traverses the entries in that index either forward or backward. It is also possible to move the cursor forward or backward on the current index by a specified number of index entries. Another approach is to artificially limit the index entries that can be enumerated using Move by setting up an index range on the cursor using Table::SetIndexRange.
offset | An arbitrary offset that indicates the desired movement of the cursor on the current index. In addition to standard offsets, this parameter can also be set with one of the following options:
|
Note: The literal value of -2147483648 is used to denote this option. Do not use this value as an ordinary offset or unintended behavior may result.
JET_MoveLast: Moves the cursor to the last index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.
Note: The literal value of 2147483647 is used to denote this option. Do not use this value as an ordinary offset or unintended behavior may result.
JET_MoveNext: Moves the cursor to the next index entry in the index (if one exists). This value is exactly equal to an ordinary offset of +1. It respects index ranges set with Table::SetIndexRange. JET_MovePrevious: Moves the cursor to the previous index entry in the index (if one exists). This value is exactly equal to an ordinary offset of -1. It respects index ranges set with Table::SetIndexRange. 0: The cursor remains at the current logical position and the existence of the index entry that corresponds to that logical position will be tested.
moveKeyNE | Moves the cursor forward or backward by the number of index entries required to skip the requested number of index key values encountered in the index. This has the effect of collapsing index entries with duplicate key values into a single index entry. Ordinarily, an offset will move the cursor by the specified number of index entries regardless of their key values. |
|
inline |
Moves the cursor to the first index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.
|
inline |
Moves the cursor to the last index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.
|
inline |
Moves the cursor to the next index entry in the index (if one exists). This value is exactly equal to an ordinary offset of +1. It respects index ranges set with Table::SetIndexRange.
|
inline |
Moves the cursor to the previous index entry in the index (if one exists). This value is exactly equal to an ordinary offset of -1. It respects index ranges set with Table::SetIndexRange.
|
inline |
This function is called from Database::CreateTable allowing derived types to perform additional operations after the object is fully created.
|
inline |
This function is called from Database::OpenTable allowing derived types to perform additional operations after the object is fully created.
|
inlineexplicitnoexcept |
Checks that both sessionId_ and tableId_ are not assigned their nil values.
|
inline |
The PrepareUpdate function is the first operation in performing an update, for the purposes of inserting a new record or replacing an existing record with new values. Updates are done by calling Table::PrepareUpdate, then calling Table::SetColumn or Table::SetColumns zero or more times and finally by calling Table::Store to complete the operation. Table::PrepareUpdate and Table::Store set the boundaries for an update operation and are important in having only the final update state of a record entered into indexes. This is both more efficient, but also required in cases where data must match a valid state through more than on set column operation.
option | A value from the PrepareUpdateOptions enumeration. |
|
inline |
Reads a bool value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
columnId | The column id identifying the column. |
value | A reference to a bool variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads a DateTime value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
columnId | The column id identifying the column. |
value | A reference to a DateTime variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads a binary value, into a IO::MemoryStream, from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
columnId | The column id identifying the column. |
value | A reference to a IO::MemoryStream that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads a std::chrono::system_clock::time_point value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
columnId | The column id identifying the column. |
value | A reference to a std::chrono::system_clock::time_point variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads the column value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
T | Any type matching the DirectType concept. |
columnId | The column id identifying the column. |
value | A reference to a variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads a text value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
T | Any type that matches the StringLike concept. |
columnId | The column id identifying the column. |
value | A reference to a string type variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads a binary value from the column identified by columnId, returning true if the column contained a value, or false. if the column is NULL.
T | Any type that matches the StringLike concept. |
columnId | The column id identifying the column. |
value | A reference to a container type variable that will be assigned the value of the column. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Reads binary data from a column of type ColumnType::LongBinary.
columnId | The column id identifying the column. |
data | A pointer to a buffer that will receive the data retrieved from the column. |
dataSize | The size of the buffer provided for the data parameter. |
columnOffset | The offset, in bytes, into the column value where the function will start reading from. |
actualDataSize | A reference to a variable that receives the actual number of bytes retrieved by the function. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
|
inline |
Prepares the cursor for a replace of the current record. If the table has a version column, then the version column is set to the next value in its sequence. If this update does not complete, then the version value in the record will be unaffected. An update lock is taken on the record to prevent other sessions from updating this record before this session completes.
|
inline |
Retrieves a single column value from the current record. The record is that record associated with the index entry at the current position of the cursor. Alternatively, this function can retrieve a column from a record being created in the cursor copy buffer. This function can also retrieve column data from an index entry that references the current record. In addition to retrieving the actual column value, Table::RetrieveColumn can also be used to retrieve the size of a column, before retrieving the column data itself so that application buffers can be sized appropriately.
columnId | The column id of the column to retrieve. A columnId value of 0 (zero) can be given which does not itself refer to any individual column. When columnId 0 (zero) is given, all tagged columns, sparse, and multi-valued columns are treated as a single column. This facilitates retrieving all sparse columns that are present in a record. |
dataBuffer | The output buffer that receives the column value. |
dataBufferSize | The maximum size, in bytes, of the output buffer. |
actualDataSize | Receives the actual size, in bytes, of the column value. If this parameter is nullptr, then the actual size of the column value will not be returned. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. |
pretinfo | If pretinfo is give as nullptr then the function behaves as though an itagSequence of 1 and an ibLongValue of 0 (zero) were given. This causes column retrieval to retrieve the first value of a multi-valued column, and to retrieve long data at offset 0 (zero). This parameter is used to provide one or more of the following:
|
On success, the column value for the given column, is copied into the given buffer. If Less than all of the column value is copied then the warning Result::WarningBufferTruncated is returned If the actualDataSize was given, the actual size of the column value is returned. Note that NULL values have 0 (zero) length and will thus set the returned size to 0 (zero). If the column retrieved was a multi-valued column, and pretinfo was given, and RetrieveFlags::Tag must be set as an option in retrieveFlags, then the sequence number of the column value is returned in pretinfo->itagSequence.
On failure, the cursor location is left unchanged and no data is copied into the provided buffer.
This call is used just once to retrieve data of fixed or known size for non-multi-valued columns. However, when column data is of unknown size, this call is typically used twice. It is called first to determine the size of the data so it can allocate the necessary storage space. Then, the same call is made again to retrieve the column data. When the actual number of values is unknown, because a column is multi-valued, the call is typically used three times. First to get the number of values and then twice more to allocate storage and retrieve the actual data.
Retrieving all the values for a multi-valued column can be done by repeatedly calling this function with a pretinfo->itagSequence value beginning at 1 and increasing on each subsequent call. The last column value is known to be retrieved when a Result::WarningColumnNull is returned from the function. Note that this method cannot be done if the multi-value column has explicit NULL values set in its value sequence, since these values would be skipped. If an application desires to retrieve all multi-valued column values, including those explicitly set to NULL, then Table::RetrieveColumns must be used instead of Table::RetrieveColumn. Note that this function does not return the number of values for a multi-valued function when an itagSequence value of 0 (zero) is given. Only Table::RetrieveColumns will return the number of values of a column value when an itagSequence value of 0 (zero) is passed.
If this function is called at transaction level 0 (zero), for example, the calling session is not itself in a transaction, then a transaction is opened and closed within the function. The purpose of this is to return consistent results in the case that a long value spans database pages. Note that the transaction is released between function calls and a series of calls to this function when the session is not in a transaction may return data updated after the first call to this function.
The default column value will be retrieved when the column has not been set explicitly to another value, unless the RetrieveFlags::IgnoreDefault option is set in retrieveFlags.
Retrieving the autoincrement column value from the copy buffer prior to insert is a common means of identifying a record uniquely for linkage when inserting normalized data into multiple tables. The autoincrement value is allocated when the insert operation begins and can be retrieved from the copy buffer at any time until the update is complete.
When retrieving all tagged, multi-valued, and sparse columns, by setting columnId to 0 (zero), columns are retrieved in column id order from lowest column id to highest column id. The same order of column values is returned each time column values are retrieved. The order is deterministic.
|
inline |
Retrieves multiple column values from the current record in a single operation. An array of JET_RETRIEVECOLUMN structures or Ese::RetrieveColumn objects is used to describe the set of column values to be retrieved, and to describe output buffers for each column value to be retrieved.
Retrieving multiple column values using RetrieveColumns is usually significantly faster than retrieving the data for individual columns using Table::RetrieveColumn.
RetrieveColumnT | JET_RETRIEVECOLUMN, Ese::RetrieveColumn, or a type derived from either them with the same size as JET_RETRIEVECOLUMN. |
retrieveColumns | A pointer to an array of one or more JET_RETRIEVECOLUMN structures or Ese::RetrieveColumn objects. Each object provides descriptions of which column value to retrieve and where to store returned data. |
columnCount | The number of elements in the array given by retrieveColumns. |
|
inline |
Retrieves multiple column values from the current record in a single operation. An array of JET_RETRIEVECOLUMN structures or Ese::RetrieveColumn objects is used to describe the set of column values to be retrieved, and to describe output buffers for each column value to be retrieved.
SpanT | Any type that matches the SimpleSpanLike concept with a value_type of JET_RETRIEVECOLUMN, Ese::RetrieveColumn, or a type derived from either them with the same size as JET_RETRIEVECOLUMN. |
retrieveColumns | A reference to a container of one or more JET_RETRIEVECOLUMN structures or Ese::RetrieveColumn objects. Each object provides descriptions of which column value to retrieve and where to store returned data. |
|
inline |
Retrieves the size of the data stored in a multi-valued column.
columnId | The column id of the column to retrieve. |
itagSequence | The itagSequence number of the value to retrieve the size of. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must include RetrieveFlags::Tag. |
|
inline |
Retrieves the size of the data stored in a column.
columnId | The column id of the column to retrieve. |
retrieveFlags | Zero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must not include RetrieveFlags::Tag. |
|
inline |
Retrieves the key for the index entry at the current position of a cursor.
Such keys are constructed by calls to MakeKey.
The retrieved key can then be used to efficiently return that cursor to the same index entry by a call to Seek
BinaryT | Any type that matches the BinaryLike concept. |
retrieveCopyOfSearchKey | If true, the engine will return the search key for the cursor. The search key is built up using one or more prior calls to Table::MakeKey for the purposes of seeking to that key using Table::Seek or setting an index range using Table::SetIndexRange. |
|
inline |
Retrieves the key for the index entry at the current position of a cursor.
Such keys are constructed by calls to MakeKey.
The retrieved key can then be used to efficiently return that cursor to the same index entry by a call to Seek
keyData | The output buffer that will receive the key. |
maxKeyDataLength | The maximum size in bytes of the output buffer. |
actualKeyDataLength | Receives the actual size in bytes of the key. If this parameter is NULL then the actual size of the key will not be returned. If the output buffer is too small, then the actual size of the key will still be returned. That means that this number will be larger than the size of the output buffer. |
retrieveCopyOfSearchKey | If true, the engine will return the search key for the cursor. The search key is built up using one or more prior calls to Table::MakeKey for the purposes of seeking to that key using Table::Seek or setting an index range using Table::SetIndexRange. |
|
inline |
Efficiently positions a cursor to an index entry that matches the search criteria specified by the search key in that cursor and the specified inequality. A search key must have been previously constructed using Table::MakeKey.
flags | Zero or more values from the SeekFlags enumeration. The values can be combined using the | operator. |
Result::ErrorRecordNotFound: No index entry was found that matched the search criteria.
On failure, the position of the cursor will remain unchanged unless Result::ErrorRecordNotFound was returned. In that case, the cursor will be positioned where the index entry that matched the search criteria specified by the search key in that cursor and the specified inequality would have been. The cursor can be moved relative to that position but is still not on a valid index entry. If a record has been prepared for update, then that update will be canceled. If an index range is in effect, that index range will be canceled. If a search key has been constructed for the cursor, then that search key will be deleted. No change to the database state will occur.
|
inline |
Returns the handle to the session used to create or open the table cursor.
|
inline |
Sets the text value of a column identified by column id.
T | Any string container that matches the SimpleCharSpanLike concept. |
columnId | The column id identifying the column. |
text | A const reference to the string container holding the value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Sets the binary value of a column identified by column id.
T | Any type that matches the SimpleByteSpanLike concept. |
columnId | The column id identifying the column. |
value | A const reference to the binary container holding the value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Sets the value of a column identified by column id.
T | Any type that matches the DirectType concept. |
columnid | The column id identifying the column. |
value | A const reference to the variable holding the value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Sets the DateTime value of a column identified by column id.
T | DateTime |
columnid | The column id identifying the column. |
value | A const reference to the variable holding the value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Sets the std::chrono::system_clock::time_point value of a column identified by column id.
T | std::chrono::system_clock::time_point |
columnid | The column id identifying the column. |
value | A const reference to the variable holding the value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Modifies a single column value in a modified record to be inserted or to update the current record. It can overwrite an existing value, add a new value to a sequence of values in a multi-valued column, remove a value from a sequence of values in a multi-valued column, or update all or part of a long value, a column of type ColumnType::LongBinary or ColumnType::LongText.
columnId | The JET_COLUMNID of the column to be modified. |
dataBuffer | Input buffer containing data to store in the column. |
dataBufferSize | Size in bytes of the input buffer. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. Use SetFlags::None to specify that no flags from the SetFlags enumeration will be set. |
psetinfo | Pointer to optional input parameters that can be set for this function using the JET_SETINFO structure. If psetinfo is given as nullotr then the function behaves as though an itagSequence of 1 and an ibLongValue of 0 (zero) were given. This causes column set to set the first value of a multi-valued column, and to set long data beginning at offset 0 (zero). The following options can be set for this parameter:
|
|
inline |
Sets the bool value of a column identified by column id.
T | bool |
columnid | The column id identifying the column. |
value | The bool value to assign to the column. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
inline |
Set multiple column values in a single operation. An array of JET_SETCOLUMN structures, or Ese::SetColumn objects, is used to describe the set of column values to be set, and to describe input buffers for each column value to be set.
SetColumnT | Either JET_SETCOLUMN or Ese::SetColumn, or a type derived from either of them with the same size as JET_SETCOLUMN. |
setColumns | A pointer to an array of one or more JET_SETCOLUMN structures or Ese::SetColumn objects. Each object provides descriptions of which column value to set and from where to get the column data to set. |
count | The number of elements in the array given by setColumns. |
|
inline |
Set multiple column values in a single operation. An array of JET_SETCOLUMN structures, or Ese::SetColumn objects, is used to describe the set of column values to be set, and to describe input buffers for each column value to be set.
SpanT | Any type that matches the SimpleSpanLike concept with a value_type of JET_SETCOLUMN, Ese::SetColumn, or a type derived from either them with the same size as JET_SETCOLUMN. |
setColumns | A const reference to a container of one or more JET_SETCOLUMN structures or Ese::SetColumn objects. Each object provides descriptions of which column value to set and from where to get the column data to set. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | Pointer to a zero terminated string that contains the name of the index to be selected for the cursor. If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
|
inline |
Sets the current index of a cursor that defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
itagSequence | Sequence number of the multi-valued column value which will be used to position the cursor on the new index. This parameter is only used in conjunction with SetCurrentIndexFlags::NoMove. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
T | Any type that matches the SimpleStringLike concept. |
indexName | Pointer to a zero terminated string that contains the name of the index to be selected for the cursor. If this parameter is an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
T | Any type that matches the SimpleStringLike concept. |
indexName | Pointer to a zero terminated string that contains the name of the index to be selected for the cursor. If this parameter is an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
T | Any type that matches the SimpleStringLike concept. |
indexName | If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
itagSequence | Sequence number of the multi-valued column value which will be used to position the cursor on the new index. This parameter is only used in conjunction with SetCurrentIndexFlags::NoMove. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | Pointer to a zero terminated string that contains the name of the index to be selected for the cursor. If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
|
inline |
Sets the current index of a cursor that defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
|
inline |
Sets the current index of a cursor. The current index of a cursor defines which records in a table are visible to that cursor and the order in which they appear by selecting the set of index entries to use to expose those records.
indexName | If this parameter is nullptr or an empty string then the clustered index will be selected. If a primary index is defined for the table then that index will be selected because it is the same as the clustered index. If no primary index is defined for the table then the sequential index will be selected. The sequential index has no index definition. |
flags | A value from the SetCurrentIndexFlags enumeration. |
itagSequence | Sequence number of the multi-valued column value which will be used to position the cursor on the new index. This parameter is only used in conjunction with SetCurrentIndexFlags::NoMove. |
|
inline |
Temporarily limits the set of index entries that the cursor can walk using Table::Move to those starting from the current index entry and ending at the index entry that matches the search criteria specified by the search key in that cursor and the specified bound criteria. A search key must have been previously constructed using Table::MakeKey.
flags | Zero or more values from the IndexRangeFlags enumeration. The values can be combined using the | operator. |
|
inline |
Sets the column identified by columnId to NULL.
columnid | The column id. |
|
inline |
The SetSequential function notifies the database engine that the application is scanning the entire current index that contains a given cursor. Consequently, the methods that are used to access the index data will be tuned to make this scenario as fast as possible.
flags | A value from the SequentialFlags enumeration. |
|
inline |
Performs an update operation including inserting a new row into a table or updating an existing row.
|
inline |
Writes binary data to a column of type ColumnType::LongBinary.
columnid | The column id identifying the column. |
data | A pointer to a buffer that contains the data that will be written to the column. |
dataSize | The size of the buffer provided for the data parameter. |
columnOffset | The offset, in bytes, into the column value where the function will start writing to. |
flags | Zero or more values from the SetFlags enumeration. The values can be combined using the | operator. |
|
friend |
|
private |
|
private |