Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Common::Core::Ese::Table Class Reference

#include <HCCEse.h>

Inheritance diagram for Harlinn::Common::Core::Ese::Table:
[legend]

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.
 
Tableoperator= (const Table &other)=delete
 
Tableoperator= (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< TAs (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
 

Detailed Description

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:

  • Scan records
  • Search for records
  • Choose the effective sort order and visibility of those records
  • Create, update, or delete records
  • Modify the schema of the table

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.

Member Typedef Documentation

◆ ColumnId

Constructor & Destructor Documentation

◆ Table() [1/4]

Harlinn::Common::Core::Ese::Table::Table ( )
inlineconstexprnoexcept

This constructor is used to create a Table object that is not initially referencing an existing ESE table cursor.

◆ Table() [2/4]

Harlinn::Common::Core::Ese::Table::Table ( JET_SESID sessionId,
JET_TABLEID tableId )
inline

Used to initialize a Table object that references an ESE table cursor.

Parameters
sessionId
tableId

◆ ~Table()

Harlinn::Common::Core::Ese::Table::~Table ( )
inline

The destructor closes the ESE table cursor.

◆ Table() [3/4]

Harlinn::Common::Core::Ese::Table::Table ( const Table & other)
delete

◆ Table() [4/4]

Harlinn::Common::Core::Ese::Table::Table ( Table && other)
inlinenoexcept

Move constructor.

Parameters
otherThe Table object that is moved to the new object.

Member Function Documentation

◆ AddBinary() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddBinary ( const AnsiString & columnName,
unsigned long maxSize = 255,
ColumnFlags flags = ColumnFlags::NotNULL ) const
inline

Adds an binary column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
maxSize
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddBinary() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddBinary ( const T * columnName,
unsigned long maxSize = 255,
ColumnFlags flags = ColumnFlags::NotNULL ) const
inline

Adds an binary column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
maxSize
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddBoolean() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddBoolean ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a boolean column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The identifier of the newly created column.

◆ AddBoolean() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddBoolean ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a boolean column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The identifier of the newly created column.

◆ AddByte() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddByte ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a Byte column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddByte() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddByte ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a Byte column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddColumn() [1/3]

JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddColumn ( const char * columnName,
const JET_COLUMNDEF & columnDef,
const void * defaultValueBuffer = nullptr,
unsigned long defaultValueBufferSize = 0 ) const
inline

Adds a new column to an existing table in an ESE database.

Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
columnDefA const reference to a JET_COLUMNDEF structure.
defaultValueBufferA 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.
defaultValueBufferSizeThe size, in bytes, of the buffer that is specified in defaultValueBuffer.
Returns
The identifier of the newly created column.

◆ AddColumn() [2/3]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddColumn ( const T & columnName,
const JET_COLUMNDEF & columnDef,
const void * defaultValueBuffer = nullptr,
unsigned long defaultValueBufferSize = 0 ) const
inline

Adds a new column to an existing table in an ESE database.

Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
columnDefA const reference to a JET_COLUMNDEF structure.
defaultValueBufferA 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.
defaultValueBufferSizeThe size, in bytes, of the buffer that is specified in defaultValueBuffer.
Returns
The identifier of the newly created column.

◆ AddColumn() [3/3]

JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddColumn ( const wchar_t * columnName,
const JET_COLUMNDEF & columnDef,
const void * defaultValueBuffer = nullptr,
unsigned long defaultValueBufferSize = 0 ) const
inline

Adds a new column to an existing table in an ESE database.

Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
columnDefA const reference to a JET_COLUMNDEF structure.
defaultValueBufferA 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.
defaultValueBufferSizeThe size, in bytes, of the buffer that is specified in defaultValueBuffer.
Returns
The identifier of the newly created column.

◆ AddCurrency() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddCurrency ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Currency column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddCurrency() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddCurrency ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Currency column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddDateTime() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddDateTime ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an DateTime column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddDateTime() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddDateTime ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an DateTime column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddDouble() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddDouble ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an double precision floating point column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddDouble() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddDouble ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an double precision floating point column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddGuid() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddGuid ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Guid/uuid column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddGuid() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddGuid ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Guid/uuid column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt16() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt16 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int16 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt16() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt16 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int16 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt32() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt32 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int32 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt32() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt32 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int32 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt64() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt64 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int64 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddInt64() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddInt64 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an Int64 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddSByte() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddSByte ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a SByte column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The identifier of the newly created column.

◆ AddSByte() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddSByte ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds a SByte column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The identifier of the newly created column.

◆ AddSingle() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddSingle ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an single precision floating point column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddSingle() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddSingle ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an single precision floating point column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddText() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddText ( const T & columnName,
unsigned long maxSize = 127,
short codePage = 1200,
ColumnFlags flags = ColumnFlags::NotNULL ) const
inline

Adds an text column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
maxSize
codePage
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddText() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddText ( const T * columnName,
unsigned long maxSize = 127,
short codePage = 1200,
ColumnFlags flags = ColumnFlags::NotNULL ) const
inline

Adds an text column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
maxSize
codePage
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddTimeSpan() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddTimeSpan ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an TimeSpan column to the table.

ESE doesn't have a TimeSpan/duration type, this is an alias for an Int64 column.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddTimeSpan() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddTimeSpan ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an TimeSpan column to the table.

ESE doesn't have a TimeSpan/duration type, this is an alias for an Int64 column.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt16() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt16 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt16 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt16() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt16 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt16 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt32() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt32 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt32 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt32() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt32 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt32 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt64() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt64 ( const T & columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt64 column to the table.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ AddUInt64() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::AddUInt64 ( const T * columnName,
ColumnFlags flags = ColumnFlags::Fixed | ColumnFlags::NotNULL ) const
inline

Adds an UInt64 column to the table.

Template Parameters
TEither char or wchar_t.
Parameters
columnNameThe name of the column to add. The name must meet the following criteria:
  • It must be fewer than JET_cbNameMost characters in length, not including the terminating NULL.
  • It must contain characters only from the following sets: 0 through 9, A through Z, a through z, and all other punctuation except for exclamation point (!), comma (,), opening bracket ([), and closing bracket (]) — that is, ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It cannot begin with a space.
  • It must contain at least one non-space character.
flagsOne or more values from the ColumnFlags enumeration. The values can be combined using the | operator.
Returns
The column id of the newly created column.

◆ As()

template<typename T >
std::optional< T > Harlinn::Common::Core::Ese::Table::As ( JET_COLUMNID columnId,
RetrieveFlags flags = RetrieveFlags::None ) const
inline

Reads the column value from the column identified by columnId, returning std::optional<T>.

Template Parameters
TAny type for which there exists a Read overload.
Parameters
columnIdThe column id identifying the column.
flagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
The column value.

◆ Cancel()

void Harlinn::Common::Core::Ese::Table::Cancel ( ) const
inline

Cancels the current update for this cursor.

◆ CheckReadResult()

static bool Harlinn::Common::Core::Ese::Table::CheckReadResult ( Result rc)
inlinestaticprivate

◆ Close()

void Harlinn::Common::Core::Ese::Table::Close ( )
inline

Closes an open table in a database. The table may be a temporary table or a normal table.

◆ Copy()

void Harlinn::Common::Core::Ese::Table::Copy ( ) const
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.

◆ CreateIndex() [1/4]

void Harlinn::Common::Core::Ese::Table::CreateIndex ( const char * indexName,
IndexFlags indexFlags,
const char * keyString,
unsigned long keyStringLength,
unsigned long density = 95 ) const
inline

Creates an index for the table.

Parameters
indexNameA 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:
  • It must contain fewer characters than JET_cbNameMost, not including the terminating null character.
  • It must contain only characters from the following categories: 0 through 9, A through Z, a through z, and all punctuation characters except for "!" (exclamation point), "," (comma), "[" (opening bracket), and "]" (closing bracket) — that is, the ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It must not begin with a space.
  • It must contain at least one non-space character.
indexFlagsZero or more values from the IndexFlags enumeration. The values can be combined using the | operator.
keyStringA pointer to a double null-terminated string of null-delimited tokens.
keyStringLengthThe length, in charactes, of the keyString parameter, including the two terminating null characters.
densityThe percentage density of the initial index B+ tree.

◆ CreateIndex() [2/4]

template<SimpleStringLike T, SimpleCharSpanLike SpanT>
requires std::is_same_v<typename T::value_type, typename SpanT::value_type >
void Harlinn::Common::Core::Ese::Table::CreateIndex ( const T & indexName,
IndexFlags indexFlags,
const SpanT & keyString,
unsigned long density = 95 ) const
inline

Creates an index for the table.

Parameters
indexNameA string that specifies the name of the index to be created. The index name must conform to the following guidelines:
  • It must contain fewer characters than JET_cbNameMost, not including the terminating null character.
  • It must contain only characters from the following categories: 0 through 9, A through Z, a through z, and all punctuation characters except for "!" (exclamation point), "," (comma), "[" (opening bracket), and "]" (closing bracket) — that is, the ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It must not begin with a space.
  • It must contain at least one non-space character.
indexFlagsZero or more values from the IndexFlags enumeration. The values can be combined using the | operator.
keyStringA double null-terminated string of null-delimited tokens.
densityThe percentage density of the initial index B+ tree.

◆ CreateIndex() [3/4]

template<SimpleStringLike T>
void Harlinn::Common::Core::Ese::Table::CreateIndex ( const T & indexName,
IndexFlags indexFlags,
const typename T::value_type * keyString,
unsigned long keyStringLength,
unsigned long density = 95 ) const
inline

Creates an index for the table.

Parameters
indexNameA string that specifies the name of the index to be created. The index name must conform to the following guidelines:
  • It must contain fewer characters than JET_cbNameMost, not including the terminating null character.
  • It must contain only characters from the following categories: 0 through 9, A through Z, a through z, and all punctuation characters except for "!" (exclamation point), "," (comma), "[" (opening bracket), and "]" (closing bracket) — that is, the ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It must not begin with a space.
  • It must contain at least one non-space character.
indexFlagsZero or more values from the IndexFlags enumeration. The values can be combined using the | operator.
keyStringA pointer to a double null-terminated string of null-delimited tokens.
keyStringLengthThe length, in charactes, of the keyString parameter, including the two terminating null characters.
densityThe percentage density of the initial index B+ tree.

◆ CreateIndex() [4/4]

void Harlinn::Common::Core::Ese::Table::CreateIndex ( const wchar_t * indexName,
IndexFlags indexFlags,
const wchar_t * keyString,
unsigned long keyStringLength,
unsigned long density = 95 ) const
inline

Creates an index for the table.

Parameters
indexNameA 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:
  • It must contain fewer characters than JET_cbNameMost, not including the terminating null character.
  • It must contain only characters from the following categories: 0 through 9, A through Z, a through z, and all punctuation characters except for "!" (exclamation point), "," (comma), "[" (opening bracket), and "]" (closing bracket) — that is, the ASCII characters 0x20, 0x22 through 0x2d, 0x2f through 0x5a, 0x5c, and 0x5d through 0x7f.
  • It must not begin with a space.
  • It must contain at least one non-space character.
indexFlagsZero or more values from the IndexFlags enumeration. The values can be combined using the | operator.
keyStringA pointer to a double null-terminated string of null-delimited tokens.
keyStringLengthThe length, in charactes, of the keyString parameter, including the two terminating null characters.
densityThe percentage density of the initial index B+ tree.

◆ Delete()

void Harlinn::Common::Core::Ese::Table::Delete ( ) const
inline

Deletes the current record in a table.

◆ EscrowUpdate()

Int32 Harlinn::Common::Core::Ese::Table::EscrowUpdate ( __in JET_COLUMNID columnId,
Int32 addendum,
__in bool escrowNoRollback = false )
inline

Performs an atomic addition operation on one column. This function allows multiple sessions to update the same record concurrently without conflicts.

Parameters
columnIdThe column id of the column to be updated. This column must have a column type of ColumnType::Long with the ColumnFlags::EscrowUpdate bit set.
addendumThe addend for the column.
escrowNoRollbackIf 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.
Returns

◆ GetBookmark()

template<BinaryLike T>
void Harlinn::Common::Core::Ese::Table::GetBookmark ( T & result) const
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.

Template Parameters
TAny type that matches the BinaryLike concept.
Parameters
resultA reference to a variable that receives the bookmark.

◆ GetColumnId() [1/2]

template<SimpleStringLike T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::GetColumnId ( const T & columnName)
inline

Retrieves the column id for the column identified by the columnName argument.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to retrieve the column id for.
Returns
The requested column id.

◆ GetColumnId() [2/2]

template<ApiCharType T>
JET_COLUMNID Harlinn::Common::Core::Ese::Table::GetColumnId ( const T * columnName)
inline

Retrieves the column id for the column identified by the columnName argument.

Template Parameters
TEither char or wchar_t
Parameters
columnNameThe name of the column to retrieve the column id for.
Returns
The requested column id.

◆ GetColumns()

template<StringLike StringT>
ColumnList< StringT > Harlinn::Common::Core::Ese::Table::GetColumns ( ) const
inline

Retrieves information about the columns of a table.

Template Parameters
StringTAny type that matches the SimpleStringLike concept.
Returns
A ColumnList<StringT> providing access to information about the columns of the table.

◆ GetTableColumnInfo() [1/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const char * columnName,
JET_COLUMNBASE_A & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNBASE_A object.

◆ GetTableColumnInfo() [2/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const char * columnName,
JET_COLUMNDEF & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNDEF object.

◆ GetTableColumnInfo() [3/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const char * columnName,
JET_COLUMNLIST & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA 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.

◆ GetTableColumnInfo() [4/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const char * columnName,
void * resultData,
unsigned long resultDataSize,
ColumnInfoLevel columnInfoFlags ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
resultDataPointer 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.
resultDataSizeThe size, in bytes, of the buffer that was passed in resultData.
columnInfoFlagsA value from the ColumnInfoLevel enumeration.

◆ GetTableColumnInfo() [5/12]

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 Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const StringT & columnName,
ColumnBaseT & data ) const
inline

Retrieves information about a table column.

Template Parameters
ColumnBaseTEither JET_COLUMNBASE_W or JET_COLUMNBASE_A.
StringTAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNBASE_W or JET_COLUMNBASE_A object.

◆ GetTableColumnInfo() [6/12]

template<SimpleStringLike StringT>
void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const StringT & columnName,
JET_COLUMNDEF & data ) const
inline

Retrieves information about a table column.

Template Parameters
StringTAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNDEF object.

◆ GetTableColumnInfo() [7/12]

template<SimpleStringLike StringT>
void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const StringT & columnName,
JET_COLUMNLIST & data ) const
inline

Retrieves information about a table column.

Template Parameters
StringTAny type that matches the SimpleStringLike concept.
Parameters
columnNameThe name of the column to fetch information for.
dataA 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.

◆ GetTableColumnInfo() [8/12]

template<SimpleStringLike StringT>
void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const StringT & columnName,
void * resultData,
unsigned long resultDataSize,
ColumnInfoLevel columnInfoFlags ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
Template Parameters
StringTAny type that matches the SimpleStringLike concept.
Parameters
resultDataPointer 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.
resultDataSizeThe size, in bytes, of the buffer that was passed in resultData.
columnInfoFlagsA value from the ColumnInfoLevel enumeration.

◆ GetTableColumnInfo() [9/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const wchar_t * columnName,
JET_COLUMNBASE_W & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNBASE_W object.

◆ GetTableColumnInfo() [10/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const wchar_t * columnName,
JET_COLUMNDEF & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA reference to a JET_COLUMNDEF object.

◆ GetTableColumnInfo() [11/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const wchar_t * columnName,
JET_COLUMNLIST & data ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
dataA 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.

◆ GetTableColumnInfo() [12/12]

void Harlinn::Common::Core::Ese::Table::GetTableColumnInfo ( const wchar_t * columnName,
void * resultData,
unsigned long resultDataSize,
ColumnInfoLevel columnInfoFlags ) const
inline

Retrieves information about a table column.

Parameters
columnNameThe name of the column to fetch information for.
resultDataPointer 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.
resultDataSizeThe size, in bytes, of the buffer that was passed in resultData.
columnInfoFlagsA value from the ColumnInfoLevel enumeration.

◆ GotoBookmark()

template<SimpleByteSpanLike T>
bool Harlinn::Common::Core::Ese::Table::GotoBookmark ( const T & bookmark) const
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.

Template Parameters
TA type that matches the SimpleByteSpanLike concept.
Parameters
bookmarkA const reference to the variable containing the bookmark to go to.
Returns
true if the cursor was positioned on the bookmark, otherwise false.

◆ Handle()

JET_TABLEID Harlinn::Common::Core::Ese::Table::Handle ( ) const
inline

Returns the handle to the database table cursor.

◆ Insert()

void Harlinn::Common::Core::Ese::Table::Insert ( ) const
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.

◆ InsertCopyDeleteOriginal()

void Harlinn::Common::Core::Ese::Table::InsertCopyDeleteOriginal ( ) const
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.

◆ IsDBNull()

bool Harlinn::Common::Core::Ese::Table::IsDBNull ( JET_COLUMNID columnId,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
inline

Tests if the data stored in a column in NULL.

Parameters
columnIdThe column id of the column to retrieve.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must not include RetrieveFlags::Tag.
Returns
The size of the value identified by columnId and itagSequence.

◆ IsPositioned()

bool Harlinn::Common::Core::Ese::Table::IsPositioned ( ) const
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.

Returns
true if the cursor is positioned on a record.

◆ IsValid()

bool Harlinn::Common::Core::Ese::Table::IsValid ( ) const
inlinenoexcept

Checks that both sessionId_ and tableId_ are not assigned their nil values.

Returns
true if neither sessionId_ and tableId_ are assigned their nil values, otherwise false.

◆ MakeKey() [1/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( bool value,
KeyFlags flags = KeyFlags::None ) const
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.

Parameters
dateTimeA 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [2/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( const char * value,
KeyFlags flags = KeyFlags::None ) const
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.

Parameters
valueA pointer to a zero terminated c style char string.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [3/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( const DateTime & dateTime,
KeyFlags flags = KeyFlags::None ) const
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.

Parameters
dateTimeA 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [4/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( const std::chrono::system_clock::time_point & time_point,
KeyFlags flags = KeyFlags::None ) const
inline

◆ MakeKey() [5/9]

template<DirectType T>
void Harlinn::Common::Core::Ese::Table::MakeKey ( const T & keyData,
KeyFlags flags = KeyFlags::None ) const
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.

Template Parameters
T
  • An integer type, except bool.
  • A floating point type.
  • TimeSpan
  • Currency
  • Guid
  • GUID
  • boost::uuids::uuid
Parameters
keyDataA 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [6/9]

template<SimpleCharSpanLike T>
void Harlinn::Common::Core::Ese::Table::MakeKey ( const T & value,
KeyFlags flags = KeyFlags::None ) const
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.

Template Parameters
TAny type that matches the SimpleCharSpanLike concept.
Parameters
valueA 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [7/9]

template<SimpleByteSpanLike T>
void Harlinn::Common::Core::Ese::Table::MakeKey ( const T & value,
KeyFlags flags = KeyFlags::None ) const
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.

Template Parameters
TAny type that matches the SimpleByteSpanLike concept.
Parameters
valueA 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [8/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( const void * keyData,
unsigned long keyDataLength,
KeyFlags flags = KeyFlags::None ) const
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.

Parameters
keyDataThe 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.
keyDataLengthThe 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.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ MakeKey() [9/9]

void Harlinn::Common::Core::Ese::Table::MakeKey ( const wchar_t * value,
KeyFlags flags = KeyFlags::None ) const
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.

Parameters
valueA pointer to a zero terminated c style wchar_t string.
flagsZero or more values from the KeyFlags enumeration. The values can be combined using the | operator.

◆ Move()

bool Harlinn::Common::Core::Ese::Table::Move ( long offset,
bool moveKeyNE = false ) const
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.

Parameters
offsetAn 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:
  • JET_MoveFirst: Moves the cursor to the first index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.

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.

Parameters
moveKeyNEMoves 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.
Returns
true if the cursor is positioned on a record after the call.

◆ MoveFirst()

bool Harlinn::Common::Core::Ese::Table::MoveFirst ( ) const
inline

Moves the cursor to the first index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.

Returns
true if the cursor is positioned on a record after the call.

◆ MoveLast()

bool Harlinn::Common::Core::Ese::Table::MoveLast ( ) const
inline

Moves the cursor to the last index entry in the index (if one exists). This resets any index range set with Table::SetIndexRange.

Returns
true if the cursor is positioned on a record after the call.

◆ MoveNext()

bool Harlinn::Common::Core::Ese::Table::MoveNext ( ) const
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.

Returns
true if the cursor is positioned on a record after the call.

◆ MovePrevious()

bool Harlinn::Common::Core::Ese::Table::MovePrevious ( ) const
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.

Returns
true if the cursor is positioned on a record after the call.

◆ OnTableCreated()

void Harlinn::Common::Core::Ese::Table::OnTableCreated ( )
inline

This function is called from Database::CreateTable allowing derived types to perform additional operations after the object is fully created.

◆ OnTableOpened()

void Harlinn::Common::Core::Ese::Table::OnTableOpened ( )
inline

This function is called from Database::OpenTable allowing derived types to perform additional operations after the object is fully created.

◆ operator bool()

Harlinn::Common::Core::Ese::Table::operator bool ( ) const
inlineexplicitnoexcept

Checks that both sessionId_ and tableId_ are not assigned their nil values.

◆ operator=() [1/2]

Table & Harlinn::Common::Core::Ese::Table::operator= ( const Table & other)
delete

◆ operator=() [2/2]

Table & Harlinn::Common::Core::Ese::Table::operator= ( Table && other)
inlinenoexcept

Move assignment.

Parameters
otherThe Table object that is moved to this object.
Returns

◆ PrepareUpdate()

void Harlinn::Common::Core::Ese::Table::PrepareUpdate ( PrepareUpdateOptions option) const
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.

Parameters
optionA value from the PrepareUpdateOptions enumeration.

◆ Read() [1/7]

bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
bool & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Parameters
columnIdThe column id identifying the column.
valueA reference to a bool variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [2/7]

bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
DateTime & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Parameters
columnIdThe column id identifying the column.
valueA reference to a DateTime variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [3/7]

bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
IO::MemoryStream & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Parameters
columnIdThe column id identifying the column.
valueA reference to a IO::MemoryStream that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [4/7]

bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
std::chrono::system_clock::time_point & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Parameters
columnIdThe column id identifying the column.
valueA reference to a std::chrono::system_clock::time_point variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [5/7]

template<DirectType T>
bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
T & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Template Parameters
TAny type matching the DirectType concept.
Parameters
columnIdThe column id identifying the column.
valueA reference to a variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [6/7]

template<StringLike T>
bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
T & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Template Parameters
TAny type that matches the StringLike concept.
Parameters
columnIdThe column id identifying the column.
valueA reference to a string type variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ Read() [7/7]

template<BinaryLike T>
bool Harlinn::Common::Core::Ese::Table::Read ( JET_COLUMNID columnId,
T & value,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
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.

Template Parameters
TAny type that matches the StringLike concept.
Parameters
columnIdThe column id identifying the column.
valueA reference to a container type variable that will be assigned the value of the column.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns
true if a value was retried from the column, or false if the column is NULL.

◆ ReadBinary()

Ese::Result Harlinn::Common::Core::Ese::Table::ReadBinary ( JET_COLUMNID columnId,
void * data,
unsigned long dataSize,
unsigned long columnOffset,
unsigned long & actualDataSize,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
inline

Reads binary data from a column of type ColumnType::LongBinary.

Parameters
columnIdThe column id identifying the column.
dataA pointer to a buffer that will receive the data retrieved from the column.
dataSizeThe size of the buffer provided for the data parameter.
columnOffsetThe offset, in bytes, into the column value where the function will start reading from.
actualDataSizeA reference to a variable that receives the actual number of bytes retrieved by the function.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
Returns

◆ Replace()

void Harlinn::Common::Core::Ese::Table::Replace ( ) const
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.

◆ RetrieveColumn()

Ese::Result Harlinn::Common::Core::Ese::Table::RetrieveColumn ( JET_COLUMNID columnId,
void * dataBuffer,
unsigned long dataBufferSize,
unsigned long * actualDataSize,
RetrieveFlags retrieveFlags,
JET_RETINFO * pretinfo = nullptr ) const
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.

Parameters
columnIdThe 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.
dataBufferThe output buffer that receives the column value.
dataBufferSizeThe maximum size, in bytes, of the output buffer.
actualDataSizeReceives 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.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator.
pretinfoIf 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:
  • ibLongValue: Gives a binary offset into a long column value when retrieving a portion of a column value.
  • itagSequence: Gives the sequence number of the desired multi-valued column value. Note that this field is only set if the RetrieveFlags::Tag is specified. Otherwise, it is unmodified.
  • columnidNextTagged: Returns the column ID of the returned column value when retrieving all tagged, sparse and multi-valued, columns using passing columnId of 0 (zero).
Returns
The function returns one of the following values from the Ese::Result enumeration:

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.

◆ RetrieveColumns() [1/2]

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 Harlinn::Common::Core::Ese::Table::RetrieveColumns ( RetrieveColumnT * retrieveColumns,
unsigned long columnCount ) const
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.

Template Parameters
RetrieveColumnTJET_RETRIEVECOLUMN, Ese::RetrieveColumn, or a type derived from either them with the same size as JET_RETRIEVECOLUMN.
Parameters
retrieveColumnsA 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.
columnCountThe number of elements in the array given by retrieveColumns.
Returns
One of the following values from the Ese::Result enumeration.

◆ RetrieveColumns() [2/2]

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 Harlinn::Common::Core::Ese::Table::RetrieveColumns ( SpanT & retrieveColumns) const
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.

Template Parameters
SpanTAny 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.
Parameters
retrieveColumnsA 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.
Returns
One of the following values from the Ese::Result enumeration.
void ReadSensorPoint( const Ese::Table& table, SensorPoint& sensorPoint ) const
{
Int64 timestamp = 0;
std::array<Ese::RetrieveColumn, 3> retrieveColumns;
retrieveColumns[ 0 ].Bind( timestampColumnId_, timestamp );
retrieveColumns[ 1 ].Bind( flagsColumnId_, sensorPoint.Flags );
retrieveColumns[ 2 ].Bind( valueColumnId_, sensorPoint.Value );
table.RetrieveColumns( retrieveColumns );
sensorPoint.Timestamp = DateTime( timestamp );
}
Definition HCCEse.h:2036
@ DateTime
A double-precision (8-byte) floating point number that represents a date in fractional days since the...
long long Int64
Definition HCCDef.h:445
static union Harlinn::Common::Core::@0 table

◆ RetrieveColumnSize() [1/2]

unsigned long Harlinn::Common::Core::Ese::Table::RetrieveColumnSize ( JET_COLUMNID columnId,
int itagSequence,
RetrieveFlags retrieveFlags = RetrieveFlags::Tag ) const
inline

Retrieves the size of the data stored in a multi-valued column.

Parameters
columnIdThe column id of the column to retrieve.
itagSequenceThe itagSequence number of the value to retrieve the size of.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must include RetrieveFlags::Tag.
Returns
The size of the value identified by columnId and itagSequence.

◆ RetrieveColumnSize() [2/2]

unsigned long Harlinn::Common::Core::Ese::Table::RetrieveColumnSize ( JET_COLUMNID columnId,
RetrieveFlags retrieveFlags = RetrieveFlags::None ) const
inline

Retrieves the size of the data stored in a column.

Parameters
columnIdThe column id of the column to retrieve.
retrieveFlagsZero or more values from the RetrieveFlags enumeration. The values can be combined using the | operator. Must not include RetrieveFlags::Tag.
Returns
The size of the data stored in the column identified by columnId.

◆ RetrieveKey() [1/2]

template<BinaryLike BinaryT>
BinaryT Harlinn::Common::Core::Ese::Table::RetrieveKey ( bool retrieveCopyOfSearchKey = true) const
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

Template Parameters
BinaryTAny type that matches the BinaryLike concept.
Parameters
retrieveCopyOfSearchKeyIf 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.
Returns
The retrieved key data.

◆ RetrieveKey() [2/2]

void Harlinn::Common::Core::Ese::Table::RetrieveKey ( void * keyData,
unsigned long maxKeyDataLength,
unsigned long * actualKeyDataLength,
bool retrieveCopyOfSearchKey = true ) const
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

Parameters
keyDataThe output buffer that will receive the key.
maxKeyDataLengthThe maximum size in bytes of the output buffer.
actualKeyDataLengthReceives 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.
retrieveCopyOfSearchKeyIf 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.

◆ Seek()

Ese::Result Harlinn::Common::Core::Ese::Table::Seek ( SeekFlags flags) const
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.

Parameters
flagsZero or more values from the SeekFlags enumeration. The values can be combined using the | operator.
Returns
Returns one of the following values from the Ese::Result enumeration:
  • Result::Success: The operation completed successfully, which means that an index entry was found that exactly matched the search criteria.
  • Result::WarningUniqueKey: Exactly one index entry was found that exactly matched the search criteria. This value will only be returned if SeekFlags::CheckUniqueness was specified and it was cheap to determine that the matching index entry was the only index entry that exactly matches the search criteria.
  • Result::WarningSeekNotEqual: An index entry was found that matched the search criteria. However, that index entry was not an exact match.
  • Result::ErrorRecordNotFound: No index entry was found that matched the search criteria.

    Returns
    On success, the cursor will be positioned at an index entry that matches the search criteria. 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. When multiple index entries have the same value, the entry closest to the start of the index is always selected.

    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.

◆ SessionHandle()

JET_SESID Harlinn::Common::Core::Ese::Table::SessionHandle ( ) const
inline

Returns the handle to the session used to create or open the table cursor.

◆ SetColumn() [1/7]

template<SimpleCharSpanLike T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnId,
const T & text,
SetFlags flags = SetFlags::None ) const
inline

Sets the text value of a column identified by column id.

Template Parameters
TAny string container that matches the SimpleCharSpanLike concept.
Parameters
columnIdThe column id identifying the column.
textA const reference to the string container holding the value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumn() [2/7]

template<SimpleByteSpanLike T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnId,
const T & value,
SetFlags flags = SetFlags::None ) const
inline

Sets the binary value of a column identified by column id.

Template Parameters
TAny type that matches the SimpleByteSpanLike concept.
Parameters
columnIdThe column id identifying the column.
valueA const reference to the binary container holding the value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumn() [3/7]

template<DirectType T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnid,
const T & value,
SetFlags flags = SetFlags::None ) const
inline

Sets the value of a column identified by column id.

Template Parameters
TAny type that matches the DirectType concept.
Parameters
columnidThe column id identifying the column.
valueA const reference to the variable holding the value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumn() [4/7]

template<typename T >
requires std::is_same_v<DateTime, T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnid,
const T & value,
SetFlags flags = SetFlags::None ) const
inline

Sets the DateTime value of a column identified by column id.

Template Parameters
TDateTime
Parameters
columnidThe column id identifying the column.
valueA const reference to the variable holding the value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumn() [5/7]

template<typename T >
requires std::is_same_v<std::chrono::system_clock::time_point, T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnid,
const T & value,
SetFlags flags = SetFlags::None ) const
inline

Sets the std::chrono::system_clock::time_point value of a column identified by column id.

Template Parameters
Tstd::chrono::system_clock::time_point
Parameters
columnidThe column id identifying the column.
valueA const reference to the variable holding the value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumn() [6/7]

void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnId,
const void * dataBuffer,
unsigned long dataBufferSize,
SetFlags flags,
JET_SETINFO * psetinfo ) const
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.

Parameters
columnIdThe JET_COLUMNID of the column to be modified.
dataBufferInput buffer containing data to store in the column.
dataBufferSizeSize in bytes of the input buffer.
flagsZero 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.
psetinfoPointer 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:
  • ibLongValue: Binary offset into a long column value where set data should begin.
  • itagSequence: Sequence number of the desired multi-valued column value to set. If itagSequence is set to 0 (zero), then the value provided should be appended to then end of the sequence of multi-valued values. If the sequence number provided is greater than the last existing multi-valued value, then again the given value is appended to the end of the sequence of values. If the sequence number corresponds to an existing value then that value is replaced with the given value.

◆ SetColumn() [7/7]

template<typename T >
requires std::is_same_v<bool, T>
void Harlinn::Common::Core::Ese::Table::SetColumn ( JET_COLUMNID columnid,
T value,
SetFlags flags = SetFlags::None ) const
inline

Sets the bool value of a column identified by column id.

Template Parameters
Tbool
Parameters
columnidThe column id identifying the column.
valueThe bool value to assign to the column.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

◆ SetColumns() [1/2]

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 Harlinn::Common::Core::Ese::Table::SetColumns ( SetColumnT * setColumns,
unsigned long count ) const
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.

Template Parameters
SetColumnTEither JET_SETCOLUMN or Ese::SetColumn, or a type derived from either of them with the same size as JET_SETCOLUMN.
Parameters
setColumnsA 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.
countThe number of elements in the array given by setColumns.

◆ SetColumns() [2/2]

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 Harlinn::Common::Core::Ese::Table::SetColumns ( SpanT & setColumns) const
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.

Template Parameters
SpanTAny 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.
Parameters
setColumnsA 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.

◆ SetCurrentIndex() [1/9]

void Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const char * indexName) const
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.

Parameters
indexNamePointer 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.

◆ SetCurrentIndex() [2/9]

bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const char * indexName,
SetCurrentIndexFlags flags ) const
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.

Parameters
indexNameIf 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.
flagsA value from the SetCurrentIndexFlags enumeration.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetCurrentIndex() [3/9]

bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const char * indexName,
SetCurrentIndexFlags flags,
unsigned long itagSequence ) const
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.

Parameters
indexNameIf 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.
flagsA value from the SetCurrentIndexFlags enumeration.
itagSequenceSequence 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.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetCurrentIndex() [4/9]

template<SimpleStringLike T>
void Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const T & indexName) const
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.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
indexNamePointer 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.

◆ SetCurrentIndex() [5/9]

template<SimpleStringLike T>
bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const T & indexName,
SetCurrentIndexFlags flags ) const
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.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
indexNamePointer 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.
flagsA value from the SetCurrentIndexFlags enumeration.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetCurrentIndex() [6/9]

template<SimpleStringLike T>
bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const T & indexName,
SetCurrentIndexFlags flags,
unsigned long itagSequence ) const
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.

Template Parameters
TAny type that matches the SimpleStringLike concept.
Parameters
indexNameIf 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.
flagsA value from the SetCurrentIndexFlags enumeration.
itagSequenceSequence 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.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetCurrentIndex() [7/9]

void Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const wchar_t * indexName) const
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.

Parameters
indexNamePointer 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.

◆ SetCurrentIndex() [8/9]

bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const wchar_t * indexName,
SetCurrentIndexFlags flags ) const
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.

Parameters
indexNameIf 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.
flagsA value from the SetCurrentIndexFlags enumeration.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetCurrentIndex() [9/9]

bool Harlinn::Common::Core::Ese::Table::SetCurrentIndex ( const wchar_t * indexName,
SetCurrentIndexFlags flags,
unsigned long itagSequence ) const
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.

Parameters
indexNameIf 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.
flagsA value from the SetCurrentIndexFlags enumeration.
itagSequenceSequence 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.
Returns
Returns false when a secondary index is being selected with flags set to SetCurrentIndexFlags::NoMove and there is no index entry in the new index that corresponds to the record associated with the index entry at the current position of the cursor on the old index.

◆ SetIndexRange()

void Harlinn::Common::Core::Ese::Table::SetIndexRange ( IndexRangeFlags flags = Ese::IndexRangeFlags::None) const
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.

Parameters
flagsZero or more values from the IndexRangeFlags enumeration. The values can be combined using the | operator.

◆ SetNull()

void Harlinn::Common::Core::Ese::Table::SetNull ( JET_COLUMNID columnid) const
inline

Sets the column identified by columnId to NULL.

Parameters
columnidThe column id.

◆ SetSequential()

void Harlinn::Common::Core::Ese::Table::SetSequential ( SequentialFlags flags = SequentialFlags::PrereadForward) const
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.

Parameters
flagsA value from the SequentialFlags enumeration.

◆ Store()

void Harlinn::Common::Core::Ese::Table::Store ( ) const
inline

Performs an update operation including inserting a new row into a table or updating an existing row.

◆ WriteBinary()

void Harlinn::Common::Core::Ese::Table::WriteBinary ( JET_COLUMNID columnid,
const void * data,
unsigned long dataSize,
unsigned long columnOffset,
SetFlags flags = SetFlags::None ) const
inline

Writes binary data to a column of type ColumnType::LongBinary.

Parameters
columnidThe column id identifying the column.
dataA pointer to a buffer that contains the data that will be written to the column.
dataSizeThe size of the buffer provided for the data parameter.
columnOffsetThe offset, in bytes, into the column value where the function will start writing to.
flagsZero or more values from the SetFlags enumeration. The values can be combined using the | operator.

Friends And Related Symbol Documentation

◆ Database

friend class Database
friend

Member Data Documentation

◆ sessionId_

JET_SESID Harlinn::Common::Core::Ese::Table::sessionId_
private

◆ tableId_

JET_TABLEID Harlinn::Common::Core::Ese::Table::tableId_
private

The documentation for this class was generated from the following file: