Skip Headers

Oracle C++ Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96583-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

8
OCCI Classes and Methods

This chapter describes the OCCI classes and methods for C++.

The topics discussed include:

Summary of OCCI Classes

Table 8-1 provides a brief description of all the OCCI classes. This section is followed by detailed descriptions of each class and its methods.

Table 8-1 OCCI Classes  
Class Description

Bfile Class

Provides access to a SQL BFILE value.

Blob Class

Provides access to a SQL BLOB value.

Bytes Class

Examines individual bytes of a sequence for comparing bytes, searching bytes, and extracting bytes.

Clob Class

Provides access to a SQL CLOB value.

Connection Class

Represents a connection with a specific database.

ConnectionPool Class

Represents a connection pool with a specific database.

Date Class

Specifies abstraction for SQL DATE data items. Also provides formatting and parsing operations to support the OCCI escape syntax for date values.

Environment Class

Provides an OCCI environment to manager memory and other resources of OCCI objects. An OCCI driver manager maps to an OCI environment handle.

IntervalDS Class

Represents a period of time in terms of days, hours, minutes, and seconds.

IntervalYM Class

Represents a period of time in terms of year and months.

Map Class

Used to store the mapping of the SQL structured type to C++ classes.

MetaData Class

Used to determine types and properties of columns in a ResultSet, that of existing schema objects in the database, or the database as a whole.

Number Class

Provides control over rounding behavior.

PObject Class

When defining types, enables specification of persistent or transient instances. Class instances derived from PObject can be either persistent or transient. If persistent, a class instance derived from PObject inherits from the PObject class; if transient, there is no inheritance.

Ref Class

The mapping in C++ for the SQL REF value, which is a reference to a SQL structured type value in the database.

RefAny Class

The mapping in C++ for the SQL REF value, which is a reference to a SQL structured type value in the database.

ResultSet Class

Provides access to a table of data generated by executing an OCCI Statement.

SQLException Class

Provides information on database access errors.

Statement Class

Used for executing SQL statements, including both query statements and insert / update / delete statements.

Stream Class

Used to provide streamed data (usually of the LONG datatype) to a prepared DML statement or stored procedure call.

Timestamp Class

Specifies abstraction for SQL TIMESTAMP data items. Also provides formatting and parsing operations to support the OCCI escape syntax for time stamp values.

OCCI Classes and Methods

OCCI classes are defined in the oracle::occi namespace. An OCCI class name within the oracle::occi namespace can be referred to in one of three ways:

Scope Resolution Operator

The scope resolution operator (::) is used to explicitly specify the oracle::occi namespace and the OCCI class name. To declare myConnection, a Connection object, using the scope resolution operator, you would use the following syntax:

oracle::occi::Connection myConnection;

using Declaration

The using declaration is used when the OCCI class name can be used in a compilation unit without conflict. To declare the OCCI class name in the oracle::occi namespace, you would use the following syntax:

using oracle::occi::Connection;

Connection now refers to oracle::occi::Connection, and myConnection can be declared as:

Connection myConnection;

using Directive

The using directive is used when all OCCI class names can be used in a compilation unit without conflict. To declare all OCCI class names in the oracle::occi namespace, you would use the following syntax:

using oracle::occi;

Then, just as with the using declaration, the following declaration would now refer to the OCCI class Connection:

Connection myConnection;

Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback