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

#include <Ccdb_NavigationColumn.h>

Inheritance diagram for dbSpaces::dbcli::NavigationColumn:
Collaboration diagram for dbSpaces::dbcli::NavigationColumn:

Public Member Functions

 ~NavigationColumn ()
 
const dtRtnStatus BindColumn (dtSTRING *value, const dtULARGE length, dtTINY *indicator=NULL)
 
const dtRtnStatus BindColumn (dtUSTRING *value, const dtULARGE length, dtTINY *indicator=NULL)
 
template<class T >
dtRtnStatus BindColumn (T *value, dtTINY *indicator=NULL)
 
const dtULARGE GetDefinitionNumber ()
 
const dtSTRING * GetDescription ()
 
const dtSTRING * GetFormat ()
 
dtTINY * GetIndicatorAddress (const dtULARGE=0)
 
const dtSTRING * GetName ()
 
const dtLARGE GetNativeStorageClass ()
 
const dtULARGE GetNativeStorageSize ()
 
const dtSTRING * GetNativeTypeName ()
 
const dtULARGE GetNumberMultiValues ()
 
const dtULARGE GetOffset ()
 
const dtULARGE GetOrdinalPosition ()
 
const dtULARGE GetPrecision ()
 
const dtULARGE GetScale ()
 
const dtUTINY GetStorageClass ()
 
const dtULARGE GetStorageSize ()
 
const dtRtnStatus GetValue (void *, dtTINY *=NULL)
 
void * GetValueAddress (const dtULARGE=0)
 
const dtBOOLEAN IsDecimalImplied ()
 
const dtBOOLEAN IsNullable ()
 
const dtBOOLEAN IsRedefine ()
 
const dtBOOLEAN IsSigned ()
 
const dtRtnStatus SetValue (dtSTRING *values, dtULARGE length, dtTINY *indicators=NULL)
 
const dtRtnStatus SetValue (dtUSTRING *values, dtULARGE length, dtTINY *indicators=NULL)
 
const dtRtnStatus SetValue (void *values, dtTINY *indicators=NULL)
 
template<class T >
dtRtnStatus SetValue (T &values, dtTINY *indicators=NULL)
 
- 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 *)
 

Detailed Description

NavigationColumn object. The NavigationColumn represents the column information for each column in a table.

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()
Since
Version 1.0

Constructor & Destructor Documentation

◆ ~NavigationColumn()

dbSpaces::dbcli::NavigationColumn::~NavigationColumn ( )

NavigationColumn destructor.

Since
Version 1.0

Member Function Documentation

◆ BindColumn() [1/3]

const dtRtnStatus dbSpaces::dbcli::NavigationColumn::BindColumn ( dtSTRING *  value,
const dtULARGE  length,
dtTINY *  indicator = NULL 
)
inline

Bind a program variable to the column. Bound columns have their variables populated with data when rows are fetched from the database.

If the column is a multi-value (array) then the value and indicator variables should be large enough to contain all multi-values.

For example, if the storage class is a dtLARGE (size of 4 bytes) and the column has 2 multi-values, then value will be 8 bytes in size. The first 4 bytes contains the first value and the second 4 bytes contains the second value. Similarly for indicator its size will be 2 bytes, the first byte contains the indicator value for the first value and the second byte contains the indicator value for the second value.

Parameters
valueValue(s) address.
lengthThe length in bytes of the value.
indicatorIndicator(s) address used to indicate NOT NULL or NULL data.
Possible indicator values are;
  • 1 - (CTYPE_NOT_NULL) not null data.
  • 2 - (CTYPE_NULL) null data.
Note
The indicator parameter is optional.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ BindColumn() [2/3]

dbSpaces::dbcli::NavigationColumn::BindColumn ( dtUSTRING *  value,
const dtULARGE  length,
dtTINY *  indicator = NULL 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since
Version 1.0

◆ BindColumn() [3/3]

template<class T >
dtRtnStatus dbSpaces::dbcli::NavigationColumn::BindColumn ( T *  value,
dtTINY *  indicator = NULL 
)
inline

Bind a program variable to the column. Bound columns have their variables populated with data when rows are fetched from the database.

If the column is a multi-value (array) then the value and indicator variables should be large enough to contain all multi-values.

For example, if the storage class is a dtLARGE (size of 4 bytes) and the column has 2 multi-values, then value will be 8 bytes in size. The first 4 bytes contains the first value and the second 4 bytes contains the second value. Similarly for indicator its size will be 2 bytes, the first byte contains the indicator value for the first value and the second byte contains the indicator value for the second value.

Parameters
valueValue(s) address.
indicatorIndicator(s) address used to indicate NOT NULL or NULL data.
Possible indicator values are;
  • 1 - (CTYPE_NOT_NULL) not null data.
  • 2 - (CTYPE_NULL) null data.
Note
The indicator parameter is optional.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ GetDefinitionNumber()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetDefinitionNumber ( )

A table can have multiple column definitions which represent multiple record (or row) layouts. COBOL is an example of a data source that have multiple record layouts (definitions).

Returns
The definition number.
Since
Version 1.0

◆ GetDescription()

const dtSTRING * dbSpaces::dbcli::NavigationColumn::GetDescription ( )

Get the column description.

Returns
The description.
Since
Version 1.0

◆ GetFormat()

const dtSTRING * dbSpaces::dbcli::NavigationColumn::GetFormat ( )

Get the data type display format for the column.

Returns
The display format.
Since
Version 1.0

◆ GetIndicatorAddress()

dtTINY * dbSpaces::dbcli::NavigationColumn::GetIndicatorAddress ( const  dtULARGE = 0)

Get the column indicator address. If the column is a multi-value column (array) the index starts from from ZERO (defaults to ZERO).

Parameters
indexThe multi-value index.
Returns
The indicator address.
Since
Version 1.0

◆ GetName()

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

Get the column name.

Returns
The name.
Since
Version 1.0

◆ GetNativeStorageClass()

const dtLARGE dbSpaces::dbcli::NavigationColumn::GetNativeStorageClass ( )

Get the native data source storage class for the column.

Returns
The native storage class.
Since
Version 1.0

◆ GetNativeStorageSize()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetNativeStorageSize ( )

Get the native data source storage size for the column.

Returns
The native storage size.
Since
Version 1.0

◆ GetNativeTypeName()

const dtSTRING * dbSpaces::dbcli::NavigationColumn::GetNativeTypeName ( )

Get the native data source type name for the column.

Returns
native type name.
Since
Version 1.0

◆ GetNumberMultiValues()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetNumberMultiValues ( )

Get the number of multi-values for the column. Arrays are treated as a column of multi-values.

Returns
number of multi-values.
Since
Version 1.0

◆ GetOffset()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetOffset ( )

Get the column offset in the table row buffer.

Returns
offset in row buffer.
Since
Version 1.0

◆ GetOrdinalPosition()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetOrdinalPosition ( )

Get the column ordinal position in the table.

Returns
The ordinal position.
Since
Version 1.0

◆ GetPrecision()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetPrecision ( )

Get the colum precision. Precision is the number of digits in a number.

Returns
The precision.
Since
Version 1.0

◆ GetScale()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetScale ( )

Get the column scale. Scale is the number of digits to the right of the decimal point in a number.

Returns
The scale.
Since
Version 1.0

◆ GetStorageClass()

const dtUTINY dbSpaces::dbcli::NavigationColumn::GetStorageClass ( )

Get the storage class ID for the column.

Returns
The storage class.
Since
Version 1.0

◆ GetStorageSize()

const dtULARGE dbSpaces::dbcli::NavigationColumn::GetStorageSize ( )

Get the storage size (bytes) for the column.

Returns
The storage size.
Since
Version 1.0

◆ GetValue()

const dtRtnStatus dbSpaces::dbcli::NavigationColumn::GetValue ( void *  ,
dtTINY *  = NULL 
)

Get the column's value and return it in the buffer provided.

If the column is a multi-value (array) then the value and indicator variables should be large enough to contain all multi-values.

For example, if the storage class is a dtLARGE (size of 4 bytes) and the column has 2 multi-values, then value will be 8 bytes in size. The first 4 bytes contains the first value and the second 4 bytes contains the second value. Similarly for indicator its size will be 2 bytes, the first byte contains the indicator value for the first value and the second byte contains the indicator value for the second value.

Parameters
valueValue(s) address.
sizeThe size in bytes of the value.
indicatorIndicator(s) address used to indicate NOT NULL or NULL data.
Possible indicator values are;
  • 1 - (CTYPE_NOT_NULL) not null data.
  • 2 - (CTYPE_NULL) null data.
Note
The indicator parameter is optional.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ GetValueAddress()

void * dbSpaces::dbcli::NavigationColumn::GetValueAddress ( const  dtULARGE = 0)

Get the column's address in the table row buffer. If the column is a multi-value column (arrary) the index starts from from ZERO (defaults to ZERO).

Parameters
indexThe multi-value index.
Returns
The address in the row buffer.
Since
Version 1.0

◆ IsDecimalImplied()

const dtBOOLEAN dbSpaces::dbcli::NavigationColumn::IsDecimalImplied ( )

Check if the column decimal point is implied. If the decimal point is implied use Scale to determine the decimal point position.

Returns
TRUE if decimal is implied; FALSE if otherwise.
Since
Version 1.0

◆ IsNullable()

const dtBOOLEAN dbSpaces::dbcli::NavigationColumn::IsNullable ( )

Is the column is nullable?

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

◆ IsRedefine()

const dtBOOLEAN dbSpaces::dbcli::NavigationColumn::IsRedefine ( )

Does this column redefine another column?

Returns
TRUE if a column redefine; FALSE if otherwise.
Since
Version 1.0

◆ IsSigned()

const dtBOOLEAN dbSpaces::dbcli::NavigationColumn::IsSigned ( )

Is the column data type signed?

Returns
TRUE if signed; FALSE if otherwise.
Since
Version 1.0

◆ SetValue() [1/4]

const dtRtnStatus dbSpaces::dbcli::NavigationColumn::SetValue ( dtSTRING *  values,
dtULARGE  length,
dtTINY *  indicators = NULL 
)
inline

Set the column's value with the value provided.

If the column is a multi-value (array) then the value and indicator variables should be large enough to contain all multi-values.

For example, if the storage class is a dtLARGE (size of 4 bytes) and the column has 2 multi-values, then value will be 8 bytes in size. The first 4 bytes contains the first value and the second 4 bytes contains the second value. Similarly for indicator its size will be 2 bytes, the first byte contains the indicator value for the first value and the second byte contains the indicator value for the second value.

Parameters
valueValue(s) address.
lengthThe length in bytes of the value.
indicatorIndicator(s) address used to indicate NOT NULL or NULL data.
Possible indicator values are;
  • 1 - (CTYPE_NOT_NULL) not null data.
  • 2 - (CTYPE_NULL) null data.
Note
The indicator parameter is optional.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0

◆ SetValue() [2/4]

const dtRtnStatus dbSpaces::dbcli::NavigationColumn::SetValue ( dtUSTRING *  values,
dtULARGE  length,
dtTINY *  indicators = NULL 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since
Version 1.0

◆ SetValue() [3/4]

template<class T >
template< class T > dtRtnStatus dbSpaces::dbcli::NavigationColumn::SetValue ( T &  values,
dtTINY *  indicators = NULL 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since
Version 1.0

◆ SetValue() [4/4]

const dtRtnStatus dbSpaces::dbcli::NavigationColumn::SetValue ( void *  values,
dtTINY *  indicators = NULL 
)
inline

Set the column's value with the value provided.

If the column is a multi-value (array) then the value and indicator variables should be large enough to contain all multi-values.

For example, if the storage class is a dtLARGE (size of 4 bytes) and the column has 2 multi-values, then value will be 8 bytes in size. The first 4 bytes contains the first value and the second 4 bytes contains the second value. Similarly for indicator its size will be 2 bytes, the first byte contains the indicator value for the first value and the second byte contains the indicator value for the second value.

Parameters
valueValue(s) address.
indicatorIndicator(s) address used to indicate NOT NULL or NULL data.
Possible indicator values are;
  • 1 - (CTYPE_NOT_NULL) not null data.
  • 2 - (CTYPE_NULL) null data.
Note
The indicator parameter is optional.
Returns
RTN_STATUS_SUCCESS or RTN_STATUS_ERROR.
Since
Version 1.0