ICellmark Class Reference

A cell is the intersection of a row and a column in a result set. More...

List of all members.

Public Member Functions

virtual simba_unsigned_native GetCachedSize ()=0
 Returns the size of data (in bytes) necessary to cache this cellmark.
virtual simba_uint16 GetColumnNumber ()=0
 Returns the column number associated with this cellmark.
virtual simba_unsigned_native GetRowNumber ()=0
 Returns the column number associated with this cellmark.
 ICellmark ()
 Constructor.
virtual bool RetrieveData (SqlData *in_data, simba_signed_native in_offset, simba_signed_native in_maxSize)=0
 Fills in_data with a chunk of data for the given cell.
virtual ~ICellmark ()
 Destructor.

Detailed Description

A cell is the intersection of a row and a column in a result set.

This class provides access to cells that have already been moved past without data being retrieved for that cell. The cell is marked as its data will be required at a later time (not with the current fetch).


Constructor & Destructor Documentation

ICellmark (  )  [inline]

Constructor.

virtual ~ICellmark (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual simba_unsigned_native GetCachedSize (  )  [pure virtual]

Returns the size of data (in bytes) necessary to cache this cellmark.

The size in bytes.

virtual simba_uint16 GetColumnNumber (  )  [pure virtual]

Returns the column number associated with this cellmark.

Returns:
The associated column number.
virtual simba_unsigned_native GetRowNumber (  )  [pure virtual]

Returns the column number associated with this cellmark.

Returns:
The associated column number.
virtual bool RetrieveData ( SqlData in_data,
simba_signed_native  in_offset,
simba_signed_native  in_maxSize 
) [pure virtual]

Fills in_data with a chunk of data for the given cell.

The SqlTypeMetadata* used by in_data is the same SqlTypeMetadata* exposed by the IColumn describing the column.

The following procedure should be implemented by this method:

  • if the data is null, call in_data->SetNull(true). in_offset and in_maxSize can be ignored
  • if the data is not of a character or binary type, then the value should be copied into the pointer returned by in_data->GetBuffer(). in_offset and in_maxSize can be ignored
  • if the data is of a character or binary type:
    • in_offset specifies the starting point to copy data from, in # of bytes from the start of that piece of data
      • in_offset must be aligned properly to the start of a data element
    • in_maxSize indicates the maximum number of bytes to copy
      • if in_maxSize is RETRIEVE_ALL_DATA, it means that the whole piece of data should be copied
    • the size of the data chunk being copied should be set with in_data->SetLength()
      • this length is the number of bytes copied
      • if there's only room for a partial element at the end, it does not need to be copied, and should not be included in the SetLength() length
      • calling SetLength() must be done before copying data in, because it modifies the size of the data buffer
    • the chunk of data starting at in_offset which is at a maximum in_size bytes long should be copied into the pointer returned by in_data->GetBuffer().
      • null termination is not necessary
Parameters:
in_data Holds a buffer to store the requested data.
in_offset Number of bytes in the data to skip before copying into in_data.
in_maxSize Maximum number of bytes of data to return in in_data.
Exceptions:
DSIException if an error occurs.
Returns:
True if there is more data for this column; false otherwise.

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

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba