C++ Client API 1.4 (November 2023)
 
Loading...
Searching...
No Matches
dbSpaces::dbcli::NavigationTable Class Reference

#include <Ccdb_NavigationTable.h>

Inheritance diagram for dbSpaces::dbcli::NavigationTable:
Collaboration diagram for dbSpaces::dbcli::NavigationTable:

Public Member Functions

virtual ~NavigationTable ()
 
const dtRtnStatus ClearCache ()
 
const dtRtnStatus ClearRow (const dtBOOLEAN=TRUE)
 
const dtRtnStatus Close ()
 
const dtBOOLEAN Delete ()
 
void Flush ()
 
const dtBOOLEAN Find ()
 
const dtBOOLEAN First ()
 
const dtUHUGE GetBatchUpdateSize ()
 
std::vector< NavigationColumn * > & GetColumns ()
 
NavigationColumnGetColumn (const dtULARGE)
 
NavigationColumnGetColumn (const dtSTRING *)
 
const dtSTRING * GetCursorName ()
 
const dtULARGE GetFetchSize ()
 
const dtSTRING * GetName ()
 
const dtSTRING * GetPartitionName ()
 
const dtSTRING * GetPathOverride ()
 
const dtRtnStatus GetRow (void *)
 
const dtUHUGE GetRowNumber ()
 
const dtULARGE GetRowSize ()
 
const dtSTRING * GetSchemaName ()
 
const dtBOOLEAN HasNullableColumns ()
 
const dtBOOLEAN Insert ()
 
const dtBOOLEAN IsFormatFixed ()
 
const dtBOOLEAN IsFormatVariable ()
 
const dtBOOLEAN IsOpen ()
 
const dtBOOLEAN IsOpenForInput ()
 
const dtBOOLEAN IsOpenForOutput ()
 
const dtBOOLEAN IsOpenForIO ()
 
const dtBOOLEAN IsOrganisationBSON ()
 
const dtBOOLEAN IsOrganisationIndexed ()
 
const dtBOOLEAN IsOrganisationJSON ()
 
const dtBOOLEAN IsOrganisationRelative ()
 
const dtBOOLEAN IsOrganisationSequential ()
 
const dtBOOLEAN IsOrganisationText ()
 
const dtBOOLEAN Last ()
 
const dtBOOLEAN Lock ()
 
const dtBOOLEAN Match ()
 
const dtBOOLEAN Next ()
 
const dtRtnStatus OpenForInput (const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForInput (const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForInput (const dtSTRING *, const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForOutput (const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForOutput (const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForOutput (const dtSTRING *, const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForIO (const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForIO (const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtRtnStatus OpenForIO (const dtSTRING *, const dtSTRING *, const dtSTRING *, const dtSTRING *)
 
const dtBOOLEAN Prev ()
 
const dtRtnStatus PutRow (void *)
 
void Reset (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetBatchUpdateSize (const dtULARGE)
 
void SetCursorName (const dtSTRING *)
 
const dtRtnStatus SetFetchSize (const dtULARGE)
 
const dtRtnStatus SetIndex (const dtULARGE)
 
const dtRtnStatus SetLockModeKeep (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeIgnore (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeNone ()
 
const dtRtnStatus SetLockModeRead (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeReadNoWait (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeReadKeep (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeWrite (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeWriteNoWait (const dtBOOLEAN=TRUE)
 
const dtRtnStatus SetLockModeShared (const dtBOOLEAN=TRUE)
 
void SetRowNumber (const dtUHUGE)
 
const void SetSearchTypeEquals ()
 
const void SetSearchTypeLessThanEquals ()
 
const void SetSearchTypeGreaterThanEquals ()
 
const void SetSearchTypeNotEquals ()
 
const void SetSearchTypeLessThan ()
 
const void SetSearchTypeGreaterThan ()
 
const dtBOOLEAN Start ()
 
const dtBOOLEAN Unlock ()
 
void UnbindColumns ()
 
const dtBOOLEAN Update ()
 
- Public Member Functions inherited from dbSpaces::dbcli::cdbBase
 cdbBase (cdbBase *, ccdbClassType, dtBOOLEAN=TRUE)
 
virtual ~cdbBase ()
 
cdb_childList_t & GetChildList ()
 
Ccoms_CommsManager * GetTransportComms ()
 
ccdbClassType GetType ()
 
void SetTransportComms (Ccoms_CommsManager *)
 

Protected Member Functions

 NavigationTable ()
 

Detailed Description

The Navigational Table object represents a table in the database. The NavigationalTable object is the main object used to access tables in the database.

A NavigationalTable object is created using the Navigation object.

A DatabaseException will be thrown if a database error occurs and exceptions are enabled. If exceptions are not enabled the following error methods can be used to get information about the error;

  • GetErrorStatus()
  • GetErrorCode()
  • GetErrorMessage()
See also
Navigation.
Since
Version 1.0

Constructor & Destructor Documentation

◆ NavigationTable()

dbSpaces::dbcli::NavigationTable::NavigationTable ( )
protected

NavigationTable default constructor.

◆ ~NavigationTable()

virtual dbSpaces::dbcli::NavigationTable::~NavigationTable ( )
virtual

NavigationTable default destructor.

Member Function Documentation

◆ ClearCache()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::ClearCache ( )

Clear the row cache. If caching is enabled read requests will fetch the row required and a number of rows after based on settings ini file settings.

Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
client.ini in the system directory.
Since
Version 1.0

◆ ClearRow()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::ClearRow ( const  dtBOOLEAN = TRUE)

Clear the values in the table row buffer. The default is to clear both the client and database row buffer for the table.

Parameters
sendRequestToServerIf FALSE only the table row buffer in the client will be cleared.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ Close()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::Close ( )

Close the table if it is open. If the table is part of a transaction it will not be physically closed until a commit or rollback has been performed.

Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Commit() and Rollback().
Since
Version 1.0

◆ Delete()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Delete ( )

Delete the current row for the table.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ Find()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Find ( )

Perform a position read on the table that matches the key based on the selected index. If an index has not been selected using the SetIndex() method, the database will choose the best index based on the current column values.

If the search type has not been set then the default type 'Equals' is used.

NOTE: Only valid for tables that have the organization type Index.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
SetIndex(), SetSearchTypeXXX()
Note
Valid for tables that are of the organization type Index.
Since
Version 1.0

◆ First()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::First ( )

Retrieve the first row in table.

If the table's organization type is Index then if the index has not been set using the SetIndex() method, the primary index will be used to retrieve the first row.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
SetIndex()
Since
Version 1.0

◆ Flush()

void dbSpaces::dbcli::NavigationTable::Flush ( )

Flush any pending update requests to the database. If update caching is enabled then any insert, delete or updates will be cached until either a read, a commit or a rollback is issued.

See also
client.ini in the system directory.
Since
Version 1.0

◆ GetBatchUpdateSize()

const dtUHUGE dbSpaces::dbcli::NavigationTable::GetBatchUpdateSize ( )

Get the batch update size used for caching table updates etc.

Returns
The size of the batch.
See also
client.ini in the system directory.
Since
Version 1.0

◆ GetColumn() [1/2]

NavigationColumn * dbSpaces::dbcli::NavigationTable::GetColumn ( const dtSTRING *  )

Get a column using the column's name.

Parameters
columnNameA valid column name.
Returns
The NavigationColumn object.
See also
NavigationColumn.
Since
Version 1.0

◆ GetColumn() [2/2]

NavigationColumn * dbSpaces::dbcli::NavigationTable::GetColumn ( const  dtULARGE)

Get a column using the column's ordinal position.

Parameters
columnIndexThe first column is 1, the second is 2, ...
Returns
The NavigationColumn object.
See also
NavigationColumn.
Since
Version 1.0

◆ GetColumns()

std::vector< NavigationColumn * > & dbSpaces::dbcli::NavigationTable::GetColumns ( )

Get a list of all the table columns.

Returns
A List of columns.
Since
Version 1.0

◆ GetCursorName()

const dtSTRING * dbSpaces::dbcli::NavigationTable::GetCursorName ( )

Get the cursor name for the table. When a table is opened it is opened with it's own cursor for accessing data in the database.

Returns
Cursor name.
See also
SetCursorName().
Since
Version 1.0

◆ GetFetchSize()

const dtULARGE dbSpaces::dbcli::NavigationTable::GetFetchSize ( )

Get the fetch size for returning rows into the local table cache. The default value is obtained from the Connection object.

Returns
The fetch size.
See also
SetFetchSize().
Since
Version 1.0

◆ GetName()

const dtSTRING * dbSpaces::dbcli::NavigationTable::GetName ( )

Get the name of the table.

Returns
The table name.
Since
Version 1.0

◆ GetPartitionName()

const dtSTRING * dbSpaces::dbcli::NavigationTable::GetPartitionName ( )

Get the partition name the table was opened with. If the NavigationTable object was opened with a specified partition name, then the partition name can be obtained using this method.

Returns
The partition name.
Since
Version 1.0

◆ GetPathOverride()

const dtSTRING * dbSpaces::dbcli::NavigationTable::GetPathOverride ( )

Get the path that overrides the table default path. The path override will have been specified when the table was open.

Returns
The path.
Since
Version 1.0

◆ GetRow()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::GetRow ( void *  )

Get the current row buffer. The buffer provided should be large enough to hold the entire row buffer.

Parameters
bufferA buffer to output the row contents into.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ GetRowNumber()

const dtUHUGE dbSpaces::dbcli::NavigationTable::GetRowNumber ( )

Get the current row number. If the table is based on the organization type Relative, then the current row number will be returned.

Returns
The row number.
Since
Version 1.0

◆ GetRowSize()

const dtULARGE dbSpaces::dbcli::NavigationTable::GetRowSize ( )

Get the table's row size as a number of bytes.

Returns
The row size.
Since
Version 1.0

◆ GetSchemaName()

const dtSTRING * dbSpaces::dbcli::NavigationTable::GetSchemaName ( )

Get the schema name that the table was opened with.

Returns
The schema name.
Since
Version 1.0

◆ HasNullableColumns()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::HasNullableColumns ( )

Checks whether the table has any columns that are nullable.

Returns
TRUE if nullable columns exist; FALSE if otherwise.
Since
Version 1.0

◆ Insert()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Insert ( )

Insert the current row into the table.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ IsFormatFixed()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsFormatFixed ( )

Checks if the table's row format is of a fixed size.

Returns
TRUE if the row format is fixed; FALSE if otherwise.
Since
Version 1.0

◆ IsFormatVariable()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsFormatVariable ( )

Checks if the table's row format is of a variable size.

Returns
TRUE if the row format is variable; FALSE if otherwise.
Since
Version 1.0

◆ IsOpen()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOpen ( )

Checks if the table is open.

Returns
TRUE if the table is open; FALSE if otherwise.
Since
Version 1.0

◆ IsOpenForInput()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOpenForInput ( )

Checks if the table is open for input only.

Returns
TRUE if the table is open for input; FALSE if otherwise.
Since
Version 1.0

◆ IsOpenForIO()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOpenForIO ( )

Checks if the table is open for both input and output.

Returns
TRUE if the table is open for output; FALSE if otherwise.
Since
Version 1.0

◆ IsOpenForOutput()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOpenForOutput ( )

Checks if the table is open output only.

Returns
TRUE if the table is open for output; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationBSON()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationBSON ( )

Checks if the table's organization type is JSON.

Returns
TRUE if the organization is JSON; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationIndexed()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationIndexed ( )

Checks if the table's organization type is Indexed.

Returns
TRUE if the organization is indexed; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationJSON()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationJSON ( )

Checks if the table's organization type is JSON.

Returns
TRUE if the organization is JSON; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationRelative()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationRelative ( )

Checks if the table's organization type is Relative.

Returns
TRUE if the organization is relative; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationSequential()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationSequential ( )

Checks if the table's organization type is Sequential.

Returns
TRUE if the organization is sequential; FALSE if otherwise.
Since
Version 1.0

◆ IsOrganisationText()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::IsOrganisationText ( )

Checks if the table's organization type is Text.

Returns
TRUE if the organization is text; FALSE if otherwise.
Since
Version 1.0

◆ Last()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Last ( )

Get the last row in table.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
SetIndex()
Since
Version 1.0

◆ Lock()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Lock ( )

Lock the current row for the table.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Unlock().
Since
Version 1.0

◆ Match()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Match ( )

Get the next row in table that matches the current search key.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Find().
Since
Version 1.0

◆ Next()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Next ( )

Get the next row in the table starting from the current row position.

If the table's organization type is Index, then the order in which the row will be retrieved will be based on the currently select index.

If a positioned read request such as Find() or First() has not been previously performed then the first row will be returned.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Find(), First(), SetIndex().
Since
Version 1.0

◆ OpenForInput() [1/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForInput ( const dtSTRING *  ,
const dtSTRING *   
)

Open the table for input only.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutput() and OpenForIO().
Since
Version 1.0

◆ OpenForInput() [2/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForInput ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for input only.

If a partition name is provided then only that partition will be opened for the table.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
partitionNameThe partition to open; if not provided all partitons are opened.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutput() and OpenForIO().
Since
Version 1.0

◆ OpenForInput() [3/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForInput ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for input only.

If a partition name is provided then only that partition will be opened for the table.

If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.

Parameters
schemaNameThe schema name the table belongs to.
tableNameThe table name to open.
partitionNameThe partition to open; if not provided all partitons are opened.
pathThe overriding path to use instead of the table's default path.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutput() and OpenForIO().
Since
Version 1.0

◆ OpenForIO() [1/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForIO ( const dtSTRING *  ,
const dtSTRING *   
)

Open the table for both input and output.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForInput() and OpenForOutput().
Since
Version 1.0

◆ OpenForIO() [2/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForIO ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for both input and output.

If a partition name is provided then only that partition will be opened for the table.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
partitionNameThe partition to open; if not provided all partitions are opened.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForInput() and OpenForOutput().
Since
Version 1.0

◆ OpenForIO() [3/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForIO ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for both input and output.

If a partition name is provided then only that partition will be opened for the table.

If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
partitionNameThe partition name to open; if not provided all partitions are opened.
pathThe overriding path to use instead of the table's default path.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForInput() and OpenForOutput().
Since
Version 1.0

◆ OpenForOutput() [1/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForOutput ( const dtSTRING *  ,
const dtSTRING *   
)

Open the table for output only.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutInput() and OpenForIO().
Since
Version 1.0

◆ OpenForOutput() [2/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForOutput ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for output only.

If a partition name is provided then only that partition will be opened for the table.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
partitionNameThe partition to open; if not provided all partitons are opened.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutInput() and OpenForIO().
Since
Version 1.0

◆ OpenForOutput() [3/3]

const dtRtnStatus dbSpaces::dbcli::NavigationTable::OpenForOutput ( const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *  ,
const dtSTRING *   
)

Open the table for output only.

If a partition name is provided then only that partition will be opened for the table.

If a path is provided then this path will override the default path for the the table. Can only be used with a table that does not have multiple partitions.

Parameters
schemaNameThe schema name that the table belongs to.
tableNameThe table name to open.
partitionNameThe partition to open; if not provided all partitons are opened.
pathThe overriding path to use instead of the table's default path.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
OpenForOutInput() and OpenForIO().
Since
Version 1.0

◆ Prev()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Prev ( )

Get the previous row in the table starting from the current row position.

If the table's organization type is Index, then the order in which the row will be retrieved will be based on the currently select index.

If a positioned read request such as Find() or First() has not been previously performed then the first row will be returned.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
SetIndex().
Since
Version 1.0

◆ PutRow()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::PutRow ( void *  )

Put a local buffer into the table's row buffer. If the buffer size is greater than the row buffer size a memory problem will be the result.

Parameters
bufferA buffer that should be the same size as the row buffer.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ Reset()

void dbSpaces::dbcli::NavigationTable::Reset ( const  dtBOOLEAN = TRUE)

Reset the state of the table. If a read cache exists it will be cleared and if an update cache exists it will be flushed to the database. The row buffer will also be cleared.

Parameters
flushUpdatesForces updates to be sent to the database.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ SetBatchUpdateSize()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetBatchUpdateSize ( const  dtULARGE)

Set the batch update size for caching the inserts, deletes and updates. The batch update size is the number of rows to cache locally of inserts, deletes and updates before sending to the database. Overrides the setting in client.ini.

Parameters
sizeThe size of the update batch.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ SetCursorName()

void dbSpaces::dbcli::NavigationTable::SetCursorName ( const dtSTRING *  )

Set the cursor name for the table. When a table is open it is assigned a cursor for accessing rows in the database. This method allows the cursor name to be set instead of an internal assigned name.

Parameters
nameThe cursor name.
Since
Version 1.0

◆ SetFetchSize()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetFetchSize ( const  dtULARGE)

Set the fetch size when retrieving rows from the database. If caching is enabled then when a read request is made to the database then the number of rows fetch including the row required and the rows after it is based on the fetch size.

Parameters
sizeThe number of rows to fetch.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
client.ini in the system directory.
Since
Version 1.0

◆ SetIndex()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetIndex ( const  dtULARGE)

Set the index to use for positioned reads using the index number.

Parameters
indexNumberThe index number to use.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ SetLockModeIgnore()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeIgnore ( const  dtBOOLEAN = TRUE)

Set the lock mode to ignore locks. If set then any read read requests on locked rows will ignore the lock and return the row.

Parameters
stateTRUE if locks are to be ignored; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Note
Not all data sources support this functionality.
Since
Version 1.0

◆ SetLockModeKeep()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeKeep ( const  dtBOOLEAN = TRUE)

Set the lock mode to keep any locks obtained by a read or write. Any successful locks are kept until an Unlock, Commit or Rollback request is made.

Parameters
stateTRUE if locks are to be kept; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Unlock(), Commit() and Rollback().
Since
Version 1.0

◆ SetLockModeNone()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeNone ( )

Set the lock mode to none.

Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ SetLockModeRead()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeRead ( const  dtBOOLEAN = TRUE)

Set the lock mode to lock on read. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.

Parameters
stateTRUE if a lock is required on read; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ SetLockModeReadKeep()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeReadKeep ( const  dtBOOLEAN = TRUE)

Set the lock mode to lock on read and keep the lock. If successful the lock will be kept even if other read requests are made until an Unlock, Commit or Rollback request is made. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.

Parameters
stateTRUE if a lock is kept on read; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
See also
Unlock(), Commit() and Rollback().
Since
Version 1.0

◆ SetLockModeReadNoWait()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeReadNoWait ( const  dtBOOLEAN = TRUE)

Set the lock mode to lock on read with no wait. If the row is already locked the method will return without waiting for the current lock to be released.

Parameters
stateTRUE if read will not wait on a locked row; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ SetLockModeShared()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeShared ( const  dtBOOLEAN = TRUE)

Set the lock mode to shared locks. If a row is already locked and you attempt to lock the same row then the lock is shared and not released until the row is unlocked by all users.

Parameters
stateTRUE if a shared lock is required; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Note
Not all data sources support this functionality.
Since
Version 1.0

◆ SetLockModeWrite()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeWrite ( const  dtBOOLEAN = TRUE)

Set the lock mode to lock on a writing a row. A lock will be attempted before trying to write/update a row. If the row is already locked the method will wait until the row is unlocked and then attempt to obtain a lock.

Parameters
stateTRUE if a lock is required on write; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ SetLockModeWriteNoWait()

const dtRtnStatus dbSpaces::dbcli::NavigationTable::SetLockModeWriteNoWait ( const  dtBOOLEAN = TRUE)

Set the lock mode to lock on a writing a row with no wait. If the row is already locked any write/update requests will return without waiting for the current lock to be released.

Parameters
stateTRUE if a write no wait on a locked row is required; FALSE if otherwise.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ SetRowNumber()

void dbSpaces::dbcli::NavigationTable::SetRowNumber ( const  dtUHUGE)

Set the row number. If the table's organization type is Relative you can find a row by
setting it's number followed by a find request.

Parameters
rowNumberRow number to find.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
See also
Find().
Since
Version 1.0

◆ SetSearchTypeEquals()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeEquals ( )

Set the search type to Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read. The search type Equals is the default search type.

See also
Find() and Start().
Since
Version 1.0

◆ SetSearchTypeGreaterThan()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeGreaterThan ( )

Set the search type to Greater Than. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.

See also
Find() and Start().
Since
Version 1.0

◆ SetSearchTypeGreaterThanEquals()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeGreaterThanEquals ( )

Set the search type to Greater Than Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.

See also
Find() and Start().
Since
Version 1.0

◆ SetSearchTypeLessThan()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeLessThan ( )

Set the search type to Less Than. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.

See also
Find() and Start().
Since
Version 1.0

◆ SetSearchTypeLessThanEquals()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeLessThanEquals ( )

Set the search type to Less Than Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.

See also
Find() and Start().
Since
Version 1.0

◆ SetSearchTypeNotEquals()

const void dbSpaces::dbcli::NavigationTable::SetSearchTypeNotEquals ( )

Set the search type to Not Equals. If the table's organization is indexed before issuing a positioned read request you can set how the key is matched for a successful read.

See also
Find() and Start().
Since
Version 1.0

◆ Start()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Start ( )

Set the start row position based on the selected index and search mode. To retrieve the actual row data a NextRow() request has to be issued.

See also
Next(), SetIndex(), SetSearchTypeXXX(), SetLockModeXXX().
Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ UnbindColumns()

void dbSpaces::dbcli::NavigationTable::UnbindColumns ( )

Unbind columns. This method will unbind all columns from local variables.

Since
Version 1.0

◆ Unlock()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Unlock ( )

Unlock the current row for the table.

Returns
TRUE if successful; FALSE if otherwise.
Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0

◆ Update()

const dtBOOLEAN dbSpaces::dbcli::NavigationTable::Update ( )

Update the current row for the table with any changes. TRUE if successful; FALSE if otherwise.

Exceptions
DatabaseException(if exceptions are enabled) when a database error occurs.
Since
Version 1.0