rwlogo

Rogue Wave DBLink API Reference Guide

Product Documentation:

Rogue Wave DBLink
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
 Tell if value is autoincremented. More...
 
IlBoolean getCaseSensitive () const
 Tell if values are case-sensitive. More...
 
const char * getLocalName () const
 Get the name of the type. More...
 
const char * getName () const
 Get the name of the type. More...
 
short getNullable () const
 Tell if the values can be null. More...
 
const char * getParams () const
 Get the possible parameters. More...
 
const char * getPrefix () const
 Get the prefix to use for a litteral value in a statement. More...
 
short getSearchable () const
 Tell if values are searchable. More...
 
IlUInt getSize () const
 Get the size of a value. More...
 
const char * getSuffix () const
 Get 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
 Tell 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

IlBoolean IldSQLType::getAutoUniqueValue ( ) const

Tell if value is autoincremented.

Returns
IlTrue if the values are auto-incremented.
IlBoolean IldSQLType::getCaseSensitive ( ) const

Tell if values are case-sensitive.

Returns
IlTrue if values are case-sensitive.
const char * IldSQLType::getLocalName ( ) const

Get the name of the type.

Returns
The localized name of the data type, if any.
const char * IldSQLType::getName ( ) const

Get 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.
short IldSQLType::getNullable ( ) const

Tell if the values can be null.

Returns
1 if values can be null, 0 otherwise.
const char * IldSQLType::getParams ( ) const

Get the possible parameters.

Returns
A character string, which is 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.

const char * IldSQLType::getPrefix ( ) const

Get 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.

short IldSQLType::getSearchable ( ) const

Tell if values are searchable.

Returns
A small integer describing 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.
IlUInt IldSQLType::getSize ( ) const

Get 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.

const char * IldSQLType::getSuffix ( ) const

Get 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.

short IldSQLType::getType ( ) const

Returns the CLI type code of this type.

The returned value is one of the following:

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 2014, 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.