Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SQLDBC::SQLDBC_ResultSetMetaData Class Reference

List of all members.

Detailed Description

A SQLDBC_ResultSetMetaData class can retrieve information used to find out types and properties of the columns in a ResultSet.

Definition at line 753 of file SQLDBC.h.

Public Types

Public Member Functions


Member Typedef Documentation

typedef enum SQLDBC::SQLDBC_ResultSetMetaData::ColumnNullBehavior SQLDBC::SQLDBC_ResultSetMetaData::ColumnNullBehavior
 


Member Enumeration Documentation

enum SQLDBC::SQLDBC_ResultSetMetaData::ColumnNullBehavior
 

Enumerator:
columnNoNulls  The column must not be NULL values.
columnNullable  The column allows NULL values.
columnNullableUnknown  It is unknown whether the column allows NULL values.

Definition at line 757 of file SQLDBC.h.


Member Function Documentation

SQLDBC_Int2 SQLDBC::SQLDBC_ResultSetMetaData::getColumnCount  ) 
 

Returns the number of columns in this ResultSet object.

Returns:
The number of columns in this result set.

SQLDBC_Retcode SQLDBC::SQLDBC_ResultSetMetaData::getColumnLabel SQLDBC_Int2  column,
char *  buffer,
const SQLDBC_StringEncoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
const
 

Requests the label of the specified column.

The label is either the column name, or the alias specified using AS in the SELECT command.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the column label should be copied into
encoding Encoding of the column label that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_Int4 SQLDBC::SQLDBC_ResultSetMetaData::getColumnLength SQLDBC_Int2  column  ) 
 

Returns maximum width in characters of the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The maximum number of bytes allowed as the width for the column values.

SQLDBC_Retcode SQLDBC::SQLDBC_ResultSetMetaData::getColumnName SQLDBC_Int2  column,
char *  buffer,
const SQLDBC_StringEncoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
const
 

Requests the name of the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the column name should be copied into
encoding Encoding of the column name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_SQLType SQLDBC::SQLDBC_ResultSetMetaData::getColumnType SQLDBC_Int2  column  ) 
 

Returns the data type of the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The Data type of the specified column.

SQLDBC_Int4 SQLDBC::SQLDBC_ResultSetMetaData::getPhysicalLength SQLDBC_Int2  column  ) 
 

Returns column's maximum physical width in bytes of the specified columns.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Maximum number of bytes allowed as the physically width of the specified column.

SQLDBC_Int4 SQLDBC::SQLDBC_ResultSetMetaData::getPrecision SQLDBC_Int2  column  ) 
 

Returns the maximum number of decimal digits of the specified column.

For number types, getPrecision retrieves the number of decimal digits. For character types, it retrieves the maximum length in characters. For binary types, it retrieves the maximum length in bytes.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The maximum number of decimal digits for the column values.

SQLDBC_Int4 SQLDBC::SQLDBC_ResultSetMetaData::getScale SQLDBC_Int2  column  ) 
 

Returns the number of decimal places of the data type of the specified column.

For non-numeric types, the scale is set to zero.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Number of decimal places of the data type of the specified column.

SQLDBC_Retcode SQLDBC::SQLDBC_ResultSetMetaData::getSchemaName SQLDBC_Int2  column,
char *  buffer,
const SQLDBC_StringEncoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
const
 

Requests the schema name of the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the schema name should be copied into
encoding Encoding of the schema name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_Retcode SQLDBC::SQLDBC_ResultSetMetaData::getTableName SQLDBC_Int2  column,
char *  buffer,
const SQLDBC_StringEncoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
const
 

Requests the table name of the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the table name should be copied into
encoding Encoding of the table name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

ColumnNullBehavior SQLDBC::SQLDBC_ResultSetMetaData::isNullable SQLDBC_Int2  column  ) 
 

Returns whether NULL values are allowed for the specified column values.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Whether NULL values are allowed for the specified column; Possible values are columnNoNulls, columnNullable or columnNullableUnknown

SQLDBC_Bool SQLDBC::SQLDBC_ResultSetMetaData::isWritable SQLDBC_Int2  column  ) 
 

Returns whether a write operation is possible on the specified column.

Parameters:
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
SQLDBC_TRUE if a write operation is possible; SQLDBC_FALSE otherwise