Rogue Wave DB Link
API Reference Guide
Product Documentation:

Rogue Wave DB Link
Documentation Home
List of all members | Public Member Functions
IldSQLType Class Reference

Instances of the class IldSQLType represent the native data types of a database. More...

#include <ildblink/ildtype.h>

Public Member Functions

IlBoolean getAutoUniqueValue () const
 Indicates if value is autoincremented. More...
 
IlBoolean getCaseSensitive () const
 Indicates if values are case-sensitive. More...
 
const char * getLocalName () const
 Gets the name of the type. More...
 
const char * getName () const
 Gets the name of the type. More...
 
short getNullable () const
 Indicates if the values can be null. More...
 
const char * getParams () const
 Gets the possible parameters. More...
 
const char * getPrefix () const
 Gets the prefix to use for a litteral value in a statement. More...
 
short getSearchable () const
 Indicates if values are searchable. More...
 
IlUInt getSize () const
 Gets the size of a value. More...
 
const char * getSuffix () const
 Gets the suffix to use for a litteral value in a statement. More...
 
short getType () const
 Returns the CLI type code of this type. More...
 
short getUnsignedAttribute () const
 Indicates if the values are unsigned.
 

Detailed Description

Instances of the class IldSQLType represent the native data types of a database.

Library: dbkernel

The functional interface of this class is made up only of accessors to the characteristics of a column data type.

See also
IldDbms.

Member Function Documentation

§ getAutoUniqueValue()

IlBoolean IldSQLType::getAutoUniqueValue ( ) const

Indicates if value is autoincremented.

Returns
IlTrue if the values are auto-incremented and IlFalse otherwise.

§ getCaseSensitive()

IlBoolean IldSQLType::getCaseSensitive ( ) const

Indicates if values are case-sensitive.

Returns
IlTrue if values are case-sensitive.

§ getLocalName()

const char* IldSQLType::getLocalName ( ) const

Gets the name of the type.

Returns
The localized name of the data type, if any.

§ getName()

const char* IldSQLType::getName ( ) const

Gets the name of the type.

Returns
The name of the current type as a character string.
Warning
The application must not deallocate nor modify this string.

§ getNullable()

short IldSQLType::getNullable ( ) const

Indicates if the values can be null.

Returns
1 if values can be null, 0 otherwise.

§ getParams()

const char* IldSQLType::getParams ( ) const

Gets the possible parameters.

Returns
The name of the parameters that can be given when defining a column of this data type.

For example, it returns the string "max length" for the varchar type.

§ getPrefix()

const char* IldSQLType::getPrefix ( ) const

Gets the prefix to use for a litteral value in a statement.

Returns
A constant character string, which is the prefix that must be used when values of this type are sent to the server in an SQL statement string.

Your application must not deallocate this string because Rogue Wave DBLink takes care of destroying it with the current object. For example, the function returns the string "'" for char or varchar data types.

§ getSearchable()

short IldSQLType::getSearchable ( ) const

Indicates if values are searchable.

Returns
The search capability.

If searchable, the data type can be used when the request contains a where clause.

The returned value ranges between 0 and 3, depending on the following conditions :

  • If a value of this type can be used in a like predicate, the returned value is 1.
  • If a value of this type can be used in a comparison predicate or a match predicate, the returned value is 2.
  • If a value of this type can be used in both the previous two conditions, the returned value is 3.
  • Otherwise, the returned value is 0.

§ getSize()

IlUInt IldSQLType::getSize ( ) const

Gets the size of a value.

Returns
The maximum size, in bytes, needed to store a value of this type.

For types with a fixed size, the value is the actual size of the data. For types with a variable size, it is the maximum that can be given at table definition time.

§ getSuffix()

const char* IldSQLType::getSuffix ( ) const

Gets the suffix to use for a litteral value in a statement.

Returns
A constant character string, which is the suffix that must be used when values of this type are sent to the server in an SQL statement string.

Your application must not deallocate this string because Rogue Wave DBLink takes care of destroying it with the current object. For example, the function returns the string "'" for char or varchar data types.

§ getType()

short IldSQLType::getType ( ) const

Returns the CLI type code of this type.

The returned value is one of the following:

  • IldSQLCursor
  • IldSQLBFile
  • IldSQLMoney
  • IldSQLByte
  • IldSQLBigint
  • IldSQLVarBin
  • IldSQLBin
  • IldSQLAllTypes
  • IldSQLChar
  • IldSQLNumeric
  • IldSQLDecimal
  • IldSQLInteger
  • IldSQLSmallint
  • IldSQLFloat
  • IldSQLReal
  • IldSQLDouble
  • IldSQLDateTime
  • IldSQLInterval
  • IldSQLVarchar
  • IldSQLBit
  • IldSQLBitVarying
  • IldSQLNamedType
  • IldSQLRef
  • IldSQLLongBin
  • IldSQLBLOB
  • IldSQLText
  • IldSQLCLOB
  • IldSQLDate
  • IldSQLTime
  • IldSQLTimestamp

The special value IldSQLAllTypes cannot be returned. It can be used only as an input argument of the function IldDbms::getTypeInfo.

Note
These codes are the strict implementation of the CLI type codes as defined in the part 3 of the ISO/IEC 9075:2003 standard.
See also
ildconst.h.

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.