Defines a specific command result set field that you read the value. More...

Inherits SAValueRead, and SAOptions.

Public Member Functions

int Pos () const
 Returns a one-based position of the field in a result set.
 
const SAStringName () const
 Returns name of the field.
 
SADataType_t FieldType () const
 Returns field data type.
 
int FieldNativeType () const
 Returns native code of field data type. More...
 
size_t FieldSize () const
 Returns field data size.
 
int FieldPrecision () const
 Returns precision of the field value. More...
 
int FieldScale () const
 Returns scale of the field value. More...
 
bool isFieldRequired () const
 Shows if it is possible for the field value to be null. More...
 
void setFieldSize (int nSize)
 Sets parameter's data size.
 
void setFieldType (SADataType_t eType)
 Sets the fields's data type.
 
void ReadLongOrLob (saLongOrLobReader_t fnReader, size_t nReaderWantedSize, void *pAddlData)
 Starts reading of Long or BLob(CLob) value using user defined callback. More...
 
- Public Member Functions inherited from SAValueRead
 SAValueRead (SADataType_t eDataType)
 Initializes the object with specified data type.
 
 SAValueRead (const SAValueRead &vr)
 Copy constructor.
 
SAValueReadoperator= (const SAValueRead &vr)
 Copy operator.
 
SADataType_t DataType () const
 Returns the object's data type.
 
bool isNull () const
 Returns true if the value of current object is NULL; otherwise false.
 
void setLongOrLobReaderMode (SALongOrLobReaderModes_t eMode)
 Sets Long or Lob data reading mode.
 
SALongOrLobReaderModes_t LongOrLobReaderMode () const
 Returns Long or Lob data reading mode.
 
bool asBool () const
 Returns the value of current object. More...
 
short asShort () const
 Returns the value of current object. More...
 
unsigned short asUShort () const
 Returns the value of current object. More...
 
sa_int32_t asInt32 () const
 Returns the value of current object. More...
 
sa_uint32_t asUInt32 () const
 Returns the value of current object. More...
 
sa_int32_t asLong () const
 Returns the value of current object. More...
 
sa_uint32_t asULong () const
 Returns the value of current object. More...
 
sa_int64_t asInt64 () const
 Returns the value of current object. More...
 
sa_uint64_t asUInt64 () const
 Returns the value of current object. More...
 
double asDouble () const
 Returns the value of current object. More...
 
SANumeric asNumeric () const
 Returns the value of current object. More...
 
SADateTime asDateTime () const
 Returns the value of current object. More...
 
SAInterval asInterval () const
 Returns the value of current object. More...
 
SAString asString () const
 Returns the value of current object. More...
 
SAString asBytes () const
 Returns the value of current object. More...
 
SAString asLongBinary () const
 Returns the value of current object. More...
 
SAString asLongChar () const
 Returns the value of current object. More...
 
SAString asBLob () const
 Returns the value of current object. More...
 
SAString asCLob () const
 Returns the value of current object. More...
 
SACommandasCursor () const
 Returns the value of current object. More...
 
 operator bool () const
 Returns the value of current object. More...
 
 operator short () const
 Returns the value of current object. More...
 
 operator unsigned short () const
 Returns the value of current object. More...
 
 operator sa_int32_t () const
 Returns the value of current object. More...
 
 operator sa_uint32_t () const
 Returns the value of current object. More...
 
 operator sa_int64_t () const
 Returns the value of current object. More...
 
 operator sa_uint64_t () const
 Returns the value of current object. More...
 
 operator double () const
 Returns the value of current object. More...
 
 operator SANumeric () const
 Returns the value of current object. More...
 
 operator SADateTime () const
 Returns the value of current object. More...
 
 operator SAInterval () const
 Returns the value of current object. More...
 
 operator SAString () const
 Returns the value of current object. More...
 
 operator SACommand * () const
 Returns the value of current object. More...
 
- Public Member Functions inherited from SAOptions
 SAOptions ()
 Default constructor.
 
virtual SAStringsetOption (const SAString &sOptionName)
 Sets a string value of a specific option. More...
 
virtual int TotalOptions () const
 Returns the count of options.
 
virtual SAString OptionName (int nIndex) const
 Returns the string value of an option.
 

Detailed Description

Defines a specific command result set field that you read the value.

Member Function Documentation

◆ FieldNativeType()

int SAField::FieldNativeType ( ) const

Returns native code of field data type.

Returns native type code of the field.

Remarks
Use the method if you need to know the original data type code of the field as it was reported by native API.

◆ FieldPrecision()

int SAField::FieldPrecision ( ) const

Returns precision of the field value.

Remarks
Returns precision of the field value (the total number of allowable digits).

◆ FieldScale()

int SAField::FieldScale ( ) const

Returns scale of the field value.

Remarks
Returns scale of the field value(the number of digits to the right of the decimal point).

◆ isFieldRequired()

bool SAField::isFieldRequired ( ) const

Shows if it is possible for the field value to be null.

Remarks
Returns false if the field value can be null; true otherwise.

◆ ReadLongOrLob()

void SAField::ReadLongOrLob ( saLongOrLobReader_t  fnReader,
size_t  nReaderWantedSize,
void *  pAddlData 
)

Starts reading of Long or BLob(CLob) value using user defined callback.

When you call SACommand::FetchNext method (after a command execution) all fields are updated by their values, including Long and BLob(CLob) fields.

If you want to control piecewise reading of Long or BLob(CLob) data you should do the following:

ReadLongOrLob method will repeatedly call user defined function of type saLongOrLobReader_t.

To get more information about reading Long and BLob(CLob) data see Query examples - Step 6.

Parameters
fnReaderThe name of user function used for Long or BLob(CLob) data reading.
nReaderWantedSizeSize of piece of data user want to get to callback function.
pAddlDataAdditional data, passed to callback function.