Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 13 of 22
A MetaData
object can be used to describe the types and properties of the columns in a ResultSet
or the existing schema objects in the database. It also provides information about the database as a whole.
Listing of the parameter types for objects:
PTYPE_TABLE
PTYPE_VIEW
PTYPE_PROC
PTYPE_FUNC
PTYPE_PKG
PTYPE_TYPE
PTYPE_TYPE_ATTR
PTYPE_TYPE_COLL
PTYPE_TYPE_METHOD
PTYPE_SYN
PTYPE_SEQ
PTYPE_COL
PTYPE_ARG
PTYPE_TYPE_ARG
PTYPE_TYPE_RESULT
PTYPE_SCHEMA
PTYPE_DATABASE
PTYPE_UNK
Listing of attribute values:
DURATION_SESSION
DURATION_TRANS
DURATION_NULL
TYPEENCAP_PRIVATE
TYPEENCAP_PUBLIC
TYPEPARAM_IN
TYPEPARAM_OUT
TYPEPARAM_INOUT
CURSOR_OPEN
CURSOR_CLOSED
CL_START
CL_END
SP_SUPPORTED
SP_UNSUPPORTED
NW_SUPPORTED
NW_UNSUPPORTED
AC_DDL
NO_AC_DDL
LOCK_IMMEDIATE
LOCK_DELAYED
These are returned on executing a get method passing some attribute for which these are the results.
To..., use the syntax:
MetaData(const MetaData &omd);
The source metadata object to be copied from.
This method returns the number of attributes related to the metadata object.
unsigned int getAttributeCount() const;
This method returns the attribute ID (ATTR_NUM_COLS,
. . . ) of the attribute represented by the attribute number specified.
AttrId getAttributeId(unsigned int attributenum) const;
The number of the attribute for which the attribute ID is to be returned.
This method returns the attribute type (NUMBER, INT, . . . ) of the attribute represented by attribute number specified.
Type getAttributeType(unsigned int attributenum) const;
The number of the attribute for which the attribute type is to be returned.
This method returns the value of the attribute as a C++ boolean. If the value is a SQL null, the result is false.
bool getBoolean(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a C++ int. If the value is SQL null, the result is 0.
int getInt(MetaData::AttrId attrid) const;
The attribute ID .
This method returns a MetaData
instance holding the attribute value. A metadata attribute value can be retrieved as a MetaData
instance. This method can only be called on attributes of the metadata type.
MetaData getMetaData(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a Number
object. If the value is a SQL null, the result is null.
Number getNumber(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a RefAny
. If the value is SQL null, the result is null.
RefAny getRef(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a string. If the value is SQL null, the result is null.
string getString(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a Timestamp
object. If the value is a SQL null, the result is null.
Timestamp getTimestamp(MetaData::AttrId attrid) const;
The attribute ID.
This method returns the value of the attribute as a C++ unsigned int. If the value is a SQL null, the result is 0.
unsigned int getUInt(MetaData::AttrId attrid) const;
The attribute ID.
This method returns a C++ vector containing the attribute value. A collection attribute value can be retrieved as a C++ vector instance. This method can only be called on attributes of a list type.
vector<MetaData> getVector(MetaData::AttrId attrid) const;
The attribute ID.
This method assigns one MetaData
object to another. This increments the reference count of the MetaData
object that is assigned.
void operator=(const MetaData &omd);
MetaData
object to be assigned.
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|