| 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_TABLEPTYPE_VIEWPTYPE_PROCPTYPE_FUNCPTYPE_PKGPTYPE_TYPEPTYPE_TYPE_ATTRPTYPE_TYPE_COLLPTYPE_TYPE_METHODPTYPE_SYNPTYPE_SEQPTYPE_COLPTYPE_ARGPTYPE_TYPE_ARGPTYPE_TYPE_RESULTPTYPE_SCHEMAPTYPE_DATABASEPTYPE_UNKListing of attribute values:
DURATION_SESSIONDURATION_TRANSDURATION_NULLTYPEENCAP_PRIVATETYPEENCAP_PUBLICTYPEPARAM_INTYPEPARAM_OUTTYPEPARAM_INOUTCURSOR_OPENCURSOR_CLOSEDCL_STARTCL_ENDSP_SUPPORTEDSP_UNSUPPORTEDNW_SUPPORTEDNW_UNSUPPORTEDAC_DDLNO_AC_DDLLOCK_IMMEDIATELOCK_DELAYEDThese 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. |
|