OCILIB (C and C++ Driver for Oracle)  4.4.0
ocilib::TypeInfo Class Reference

Provides type information on Oracle Database objects. More...

#include <ocilib.hpp>

Inherits ocilib::HandleHolder< OCI_TypeInfo *>.

Public Types

enum  TypeInfoTypeValues { Table = OCI_TIF_TABLE, View = OCI_TIF_VIEW, Type = OCI_TIF_TYPE }
 Type of object information enumerated values. More...
 
typedef Enum< TypeInfoTypeValuesTypeInfoType
 Type of object information. More...
 

Public Member Functions

 TypeInfo (const Connection &connection, const ostring &name, TypeInfoType type)
 Parametrized constructor. More...
 
TypeInfoType GetType () const
 Return the type of the given TypeInfo object.
 
ostring GetName () const
 Return the type info name.
 
Connection GetConnection () const
 Return the connection associated with a statement.
 
unsigned int GetColumnCount () const
 Return the number of columns contained in the type. More...
 
Column GetColumn (unsigned int index) const
 Return the column from its index in the resultset. More...
 

Detailed Description

Provides type information on Oracle Database objects.

This class wraps the OCILIB object handle OCI_TypeInfo and its related methods

Definition at line 4523 of file ocilib.hpp.

Member Typedef Documentation

§ TypeInfoType

Type of object information.

Possible values are TypeInfo::TypeInfoTypeValues

Definition at line 4554 of file ocilib.hpp.

Member Enumeration Documentation

§ TypeInfoTypeValues

Type of object information enumerated values.

Enumerator
Table 

Database Table information

View 

Database View information

Type 

Database type information

Definition at line 4537 of file ocilib.hpp.

Constructor & Destructor Documentation

§ TypeInfo()

ocilib::TypeInfo::TypeInfo ( const Connection connection,
const ostring name,
TypeInfoType  type 
)
inline

Parametrized constructor.

Parameters
connection- Parent connection
name- Type name
type- Kind of type to retrieve
Note
the TypeInfo object must not be accessed anymore once the parent connection object gets out of scope

Definition at line 3315 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_TypeInfoGet().

Member Function Documentation

§ GetColumnCount()

unsigned int ocilib::TypeInfo::GetColumnCount ( ) const
inline

Return the number of columns contained in the type.

Note
  • For table and views, it is the number of columns
  • For types, it is the number of member properties

Definition at line 3340 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_TypeInfoGetColumnCount().

§ GetColumn()

Column ocilib::TypeInfo::GetColumn ( unsigned int  index) const
inline

Return the column from its index in the resultset.

Parameters
index- Column index
Note
Column position starts at 1.
  • For table and views, the returned column object describes a table/view column
  • For types, the returned column object describes an object property

Definition at line 3345 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_TypeInfoGetColumn().