Main Page | Class List | File List | Class Members

RMimerMetaData Class Reference

Metadata for statements and queries. More...

List of all members.


Public Types

enum   TParamMode { EParamIn = 0x1, EParamOut = 0x2, EParamInOut = 0x3 }
  Parameter modes. These values are used to represent input, output and input/output parameters. More...
enum   TTypes {
  ECharacter = 1, EChar = 1, ENumeric = 2, EDecimal = 3,
  EInteger = 4, ESmallint = 5, EFloat = 6, EReal = 7,
  EDouble = 8, ECharacterVarying = 12, EVarchar = 12, EBoolean = 16,
  EBigint = 25, EBinaryLargeObject = 30, EBlob = 30, ECharacterLargeObject = 40,
  EClob = 40, EDate = 91, ETime = 92, ETimestamp = 93,
  EIntervalYear = 101, EIntervalMonth = 102, EIntervalDay = 103, EIntervalHour = 104,
  EIntervalMinute = 105, EIntervalSecond = 106, EIntervalYearToMonth = 107, EIntervalDayToHour = 108,
  EIntervalDayToMinute = 109, EIntervalDayToSecond = 110, EIntervalHourToMinute = 111, EIntervalHourToSecond = 112,
  EIntervalMinuteToSecond = 113, EMimerNationalCharacter = -8, EMimerNchar = -8, EMimerNationalCharacterVarying = -9,
  EMimerNvarchar = -9, EMimerNationalCharacterLargeObject = -10, EMimerNclob = -10
}
  SQL data type codes. These values may be returned by methods of this class to identify SQL data types. More...

Public Member Functions

IMPORT_C TInt  GetColumnCount () const
  Returns the number of columns in a result set.
IMPORT_C TInt  GetColumnDisplaySize (TInt aColNo)
  Returns the maximum display size of a column.
IMPORT_C TDesC *  GetColumnNameLC (TInt aColNo)
  Returns the name of the column.
IMPORT_C TInt  GetColumnPrecision (TInt aColNo)
  Returns the precision of a numeric column.
IMPORT_C TInt  GetColumnScale (TInt aColNo)
  Returns the number of decimals of a column.
IMPORT_C enum TTypes  GetColumnType (TInt aColNo) const
  Returns the SQL type of the specified column.
IMPORT_C TBufC< 50 >  GetColumnTypeName (TInt aColNo)
  Returns the SQL type name of the specified column.
IMPORT_C TInt  GetParameterCount () const
  Returns the number of parameters of a statement.
IMPORT_C TInt  GetParameterDisplaySize (TInt aParNo)
  Returns the maximum display size of a parameter.
IMPORT_C enum TParamMode  GetParameterMode (TInt aParNo)
  Returns the number of parameters of a statement.
IMPORT_C TInt  GetParameterPrecision (TInt aParNo)
  Returns the precision of a numeric parameter.
IMPORT_C TInt  GetParameterScale (TInt aParNo)
  Returns the number of decimals of a parameter.
IMPORT_C enum TTypes  GetParameterType (TInt aParNo) const
  Returns the SQL type of the specified parameter.
IMPORT_C TBufC< 50 >  GetParameterTypeName (TInt aParNo)
  Returns the SQL type name of the specified parameter.
IMPORT_C TBool  IsColumnNullable (TInt aColNo)
  Determines whether column values may be NULL or not.
IMPORT_C TBool  IsColumnReadOnly (TInt aColNo)
  Determines whether column may be updated or not.
IMPORT_C TInt  IsParameterNullable (TInt aParNo)
  Determines whether parameter values may be NULL or not.

Friends

class  RMimerCommand
class  RMimerParameterData
class  RMimerResultSet

Detailed Description

Metadata for statements and queries.

The metadata object may be obtained either after having specifically compiled an SQL statement contained in an RMimerCommand object, or after a result set has been created.

See also:
RMimerCommand::PrepareL() about compiling statements.

RMimerCommand::GetMetaDataL() about obtaining metadata about a compiled statement.

RMimerResultSet::GetMetaDataL() about obtaining metadata about an open result set.


Member Enumeration Documentation

enum RMimerMetaData::TParamMode
 

Parameter modes. These values are used to represent input, output and input/output parameters.

The enumeration is designed so that: EParamInOut == (EParamIn | EParamOut)

Enumeration values:
EParamIn  Represents a procedure IN parameter.
EParamOut  Represents a procedure OUT parameter.
EParamInOut  Represents a procedure INOUT parameter.
enum RMimerMetaData::TTypes
 

SQL data type codes. These values may be returned by methods of this class to identify SQL data types.

Enumeration values:
ECharacter  CHARACTER / CHAR.
EChar  CHARACTER / CHAR.
ENumeric  NUMERIC(p,s).
EDecimal  DECIMAL(p,s).
EInteger  INTEGER.
ESmallint  SMALLINT.
EFloat  FLOAT.
EReal  FLOAT.
EDouble  DOUBLE PRECISION.
ECharacterVarying  CHARACTER VARYING / VARCHAR.
EVarchar  CHARACTER VARYING / VARCHAR.
EBigint  BIGINT.
EBinaryLargeObject  BINARY LARGE OBJECT / BLOB.
EBlob  BINARY LARGE OBJECT / BLOB.
ECharacterLargeObject  CHARACTER LARGE OBJECT / CLOB.
EClob  CHARACTER LARGE OBJECT / CLOB.
EDate  DATE.
ETime  TIME.
ETimestamp  TIMESTAMP.
EIntervalYear  INTERVAL YEAR.
EIntervalMonth  INTERVAL MONTH.
EIntervalDay  INTERVAL DAY.
EIntervalHour  INTERVAL HOUR.
EIntervalMinute  INTERVAL MINUTE.
EIntervalSecond  INTERVAL SECOND.
EIntervalYearToMonth  INTERVAL YEAR TO MONTH.
EIntervalDayToHour  INTERVAL DAY TO HOUR.
EIntervalDayToMinute  INTERVAL DAY TO MINUTE.
EIntervalDayToSecond  INTERVAL DAY TO SECOND.
EIntervalHourToMinute  INTERVAL HOUR TO MINUTE.
EIntervalHourToSecond  INTERVAL HOUR TO SECOND.
EIntervalMinuteToSecond  INTERVAL MINUTE TO SECOND.
EMimerNationalCharacter  NATIONAL CHARACTER / NCHAR.
EMimerNchar  NATIONAL CHARACTER / NCHAR.
EMimerNationalCharacterVarying  NATIONAL CHARACTER VARYING / NVARCHAR.
EMimerNvarchar  NATIONAL CHARACTER VARYING / NVARCHAR.
EMimerNationalCharacterLargeObject  NATIONAL CHARACTER LARGE OBJECT / NCLOB.
EMimerNclob  NATIONAL CHARACTER LARGE OBJECT / NCLOB.

Member Function Documentation

IMPORT_C TInt RMimerMetaData::GetColumnCount  )  const
 

Returns the number of columns in a result set.

Returns:
The number of columns.
IMPORT_C TInt RMimerMetaData::GetColumnDisplaySize TInt  aColNo  ) 
 

Returns the maximum display size of a column.

The value returned by this function is the maximum size, in characters, of the character string representation of the specified column. One can also formulate this as this value being the minimum number of characters required to hold all possible values of this column.

For example, a CHARACTER(255) column has the display size 255. An INTEGER(1) column has the display size 2 (sign plus one digit, like '-1'). A TIMESTAMP(9) column has the display size 29 (like '2005-01-24 12:59:32.123456789').

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The display size.
IMPORT_C TDesC* RMimerMetaData::GetColumnNameLC TInt  aColNo  ) 
 

Returns the name of the column.

The name of the column is the label, if such is specified. If a label is not specified, the returned name is the name of the underlying column. If the result set column is an expression, thus not derived directly from an underlying column, the column has no name and an empty string is returned.

For example: select COL as KOL from TAB , the column name is 'KOL' select COL from TAB , the column name is 'COL' select COL+COL2 from tab , the column name is ''

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The name of the column.
IMPORT_C TInt RMimerMetaData::GetColumnPrecision TInt  aColNo  ) 
 

Returns the precision of a numeric column.

If the specified column represents a numeric value, this method returns the maximum number of digits, including decimal digits, that may be represented by the column.

If the column is a non-numeric column, this method returns 0.

For example, an INTEGER column has the precision 10. A SMALLINT column has the precision 5. A NUMERIC(12,5) column has the precision 12. A FLOAT column has the precision 16.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The precision of the column.
IMPORT_C TInt RMimerMetaData::GetColumnScale TInt  aColNo  ) 
 

Returns the number of decimals of a column.

This method returns the number of decimal digits of a column. If the column type is non-numeric or an approximate numeric (FLOAT and DOUBLE PRECISION), 0 is returned.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The scale of the column.
IMPORT_C enum TTypes RMimerMetaData::GetColumnType TInt  aColNo  )  const
 

Returns the SQL type of the specified column.

The type returned is the SQL type of the column. The type values returned are in compliance with the concise data type codes of the ISO-9075 standard. There are also constants defined in this class.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The data type code.
IMPORT_C TBufC<50> RMimerMetaData::GetColumnTypeName TInt  aColNo  ) 
 

Returns the SQL type name of the specified column.

The typename returned by this method is a character string representing the data type of the column.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
The data type name.
IMPORT_C TInt RMimerMetaData::GetParameterCount  )  const
 

Returns the number of parameters of a statement.

Returns:
The number of parameters.
IMPORT_C TInt RMimerMetaData::GetParameterDisplaySize TInt  aParNo  ) 
 

Returns the maximum display size of a parameter.

The value returned by this function is the maximum size, in characters, of the character string representation of the specified parameter. One can also formulate this as this value being the minimum number of characters required to hold all possible values of this parameter.

For example, a CHARACTER(255) parameter has the display size 255. An INTEGER(1) parameter has the display size 2 (sign plus one digit, like '-1'). A TIMESTAMP(9) parameter has the display size 29 (like '2005-01-24 12:59:32.123456789'.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The display size.
IMPORT_C enum TParamMode RMimerMetaData::GetParameterMode TInt  aParNo  ) 
 

Returns the number of parameters of a statement.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The parameter mode, either EParamIn, EParamOut or EParamInOut.
IMPORT_C TInt RMimerMetaData::GetParameterPrecision TInt  aParNo  ) 
 

Returns the precision of a numeric parameter.

If the specified parameter represents a numeric value, this method returns the maximum number of digits, including decimal digits, that may be represented by the parameter.

If the parameter is a non-numeric parameter, this method returns 0.

For example, an INTEGER parameter has the precision 10. A SMALLINT parameter has the precision 5. A NUMERIC(12,5) parameter has the precision 12. A FLOAT parameter has the precision 16.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The precision of the parameter.
IMPORT_C TInt RMimerMetaData::GetParameterScale TInt  aParNo  ) 
 

Returns the number of decimals of a parameter.

This method returns the number of decimal digits of a parameter. If the parameter type is non-numeric or an approximate numeric (FLOAT and DOUBLE PRECISION), 0 is returned.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The scale of the parameter.
IMPORT_C enum TTypes RMimerMetaData::GetParameterType TInt  aParNo  )  const
 

Returns the SQL type of the specified parameter.

The type returned is the SQL type of the parameter. The type values returned are in compliance with the concise data type codes of the ISO-9075 standard. There are also constants defined in this class.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The data type code.
IMPORT_C TBufC<50> RMimerMetaData::GetParameterTypeName TInt  aParNo  ) 
 

Returns the SQL type name of the specified parameter.

The typename returned by this method is a character string representing the data type of the parameter.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
The data type name.
IMPORT_C TBool RMimerMetaData::IsColumnNullable TInt  aColNo  ) 
 

Determines whether column values may be NULL or not.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
ETrue if the column may be NULL, EFalse if not.
IMPORT_C TBool RMimerMetaData::IsColumnReadOnly TInt  aColNo  ) 
 

Determines whether column may be updated or not.

Parameters:
aColNo  The column number. First column is column number 1.
Returns:
ETrue if the column may updated, EFalse if not.
IMPORT_C TInt RMimerMetaData::IsParameterNullable TInt  aParNo  ) 
 

Determines whether parameter values may be NULL or not.

Parameters:
aParNo  The parameter number. First parameter is parameter number 1.
Returns:
ETrue if the parameter may be NULL, EFalse if not.

Submit a comment or suggestion Version 9.2.5b of Mimer C++ API for Symbian OS
Copyright Mimer Information Technology AB, Box 1713, SE-751 47 UPPSALA, Sweden. All Rights Reserved.