Skip Headers

Table of Contents Image 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 Index
Index

Master Index

Feedback

Go to next page

Contents

Title and Copyright Information

List of Figures

List of Tables

Send Us Your Comments

Preface

Audience
Organization
Related Documentation
Conventions
Documentation Accessibility

What's New in Orace C++ Call Interface Programmer's Guide?

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

Part I OCCI Programmer's Guide

1 Introduction to OCCI

Overview of OCCI
Benefits of OCCI
Building an OCCI Application
Functionality of OCCI
Procedural and Nonprocedural Elements
Processing of SQL Statements
Data Definition Language Statements
Control Statements
Data Manipulation LanguageSQL Statements
Queries
Overview of PL/SQL
Special OCCI/SQL Terms
Object Support
Client-Side Object Cache
Runtime Environment for Objects
Associative and Navigational Interfaces
Metadata Class
Object Type Translator Utility

2 Relational Programming

Connecting to a Database
Creating and Terminating an Environment
Opening and Closing a Connection
Creating a Connection Pool
Executing SQL DDL and DML Statements
Creating a Statement Handle
Creating a Statement Handle to Execute SQL Commands
Reusing a Statement Handle
Terminating a Statement Handle
Types of SQL Statements in the OCCI Environment
Standard Statements
Parameterized Statements
Callable Statements
Streamed Reads and Writes
Modifying Rows Iteratively
Executing SQL Queries
Result Set
Specifying the Query
Optimizing Performance by Setting Prefetch Count
Executing Statements Dynamically
Status Definitions
Committing a Transaction
Error Handling
Null and Truncated Data
Advanced Relational Techniques
Utilizing a Shared Server Environment
Optimizing Performance

3 Object Programming

Overview of Object Programming
Working with Objects in OCCI
Persistent Objects
Transient Objects
Values
Representing Objects in C++ Applications
Creating Persistent and Transient Objects
Creating Object Representations using the OTT Utility
Developing an OCCI Object Application
Basic Object Program Structure
Basic Object Operational Flow
Overview of Associative Access
Using SQL to Access Objects
Inserting and Modifying Values
Overview of Navigational Access
Retrieving an Object Reference (REF) from the Database Server
Pinning an Object
Manipulating Object Attributes
Marking Objects and Flushing Changes
Marking an Object as Modified (Dirty)
Recording Changes in the Database
Garbage Collection in the Object Cache
Transactional Consistency of References
Overview of Complex Object Retrieval
Retrieving Complex Objects
Prefetching Complex Objects
Working with Collections
Fetching Embedded Objects
Nullness
Using Object References
Freeing Objects
Type Inheritance
Substitutability
NOT INSTANTIABLE Types and Methods
OCCI Support for Type Inheritance
OTT Support for Type Inheritance
A Sample OCCI Application

4 Datatypes

Overview of Oracle Datatypes
OCCI Type and Data Conversion
Internal Datatypes
Character Strings and Byte Arrays
Universal Rowid (UROWID)
External Datatypes
Description of External Datatypes
Data Conversions
Data Conversions for LOB Datatypes
Data Conversions for Date, Timestamp, and Interval Datatypes

5 Introduction to LOBs

Overview of LOBs
Internal LOBs (BLOBs, CLOBs, and NCLOBs)
External LOBs (BFILEs)
LOB Values and Locators
LOB Classes and Methods
Creating LOBs
Opening and Closing LOBs
Reading and Writing LOBs
Improving Read and Write Performance
Updating LOBs
Objects with LOB Attributes
Persistent Objects with LOB Attributes
Transient Objects with LOB Attributes

6 Metadata

Overview of Metadata
Notes on Types and Attributes
Describing Database Metadata
Metatdata Code Examples
Attribute Reference
Parameter Attributes
Table and View Attributes
Procedure, Function, and Subprogram Attributes
Package Attributes
Type Attributes
Type Attribute Attributes
Type Method Attributes
Collection Attributes
Synonym Attributes
Sequence Attributes
Column Attributes
Argument and Result Attributes
List Attributes
Schema Attributes
Database Attributes

7 How to Use the Object Type Translator Utility

Overview of the Object Type Translator Utility
How to Use the OTT Utility
Creating Types in the Database
Invoking the OTT Utility
Specifying OTT Parameters
Invoking the OTT Utility on the Command Line
Overview of the INTYPE File
OTT Utility Datatype Mappings
OTT Type Mapping Example for C++
Overview of the OUTTYPE File
The OTT Utility and OCCI Applications
OTT Utility Parameters for C++
OTT-Generated C++ Classes
Map Registry Function
Extending OTT C++ Classes
Example for Extending OTT Classes
Carrying Forward User Added Code
Properties of OTT Markers
Where the Markers Can Be Used
Code Samples Showing How To Use OTT Markers
Example OCCI Application
OTT Utility Reference
OTT Command Line Syntax
OTT Utility Parameters
Where OTT Parameters Can Appear
Structure of the INTYPE File
Nested #include File Generation
SCHEMA_NAMES Usage
Default Name Mapping
Restriction Affecting the OTT Utility: File Name Comparison

Part II OCCI API Reference

8 OCCI Classes and Methods

Summary of OCCI Classes
OCCI Classes and Methods
Bfile Class
Summary of Bfile Methods
close()
closeStream()
fileExists()
getDirAlias()
getFileName()
getStream()
isInitialized()
isNull()
isOpen()
length()
open()
operator=()
operator==()
operator!=()
read()
setName()
setNull()
Blob Class
Summary of Blob Methods
append()
close()
closeStream()
copy()
getChunkSize()
getStream()
isInitialized()
isNull()
isOpen()
length()
open()
operator=()
operator==()
operator!= ()
read()
setEmpty()
setEmpty()
setNull()
trim()
write()
writeChunk()
Bytes Class
Summary of Bytes Methods
byteAt()
getBytes()
isNull()
length()
setNull()
Clob Class
Summary of Clob Methods
append()
close()
closeStream()
copy()
getCharSetForm()
getCharSetId()
getChunkSize()
getStream()
isInitialized()
isNull()
isOpen()
length()
open()
operator=()
operator==()
operator!=()
read()
setCharSetId()
setCharSetForm()
setEmpty()
setEmpty()
setNull()
trim()
write()
writeChunk()
Connection Class
Summary of Connection Methods
changePassword()
commit()
createStatement()
flushCache()
getClientCharSet()
getClientNCHARCharSet()
getMetaData()
getOCIServer()
getOCIServiceContext()
getOCISession()
rollback()
terminateStatement()
ConnectionPool Class
Summary of ConnectionPool Methods
createConnection()
createProxyConnection()
getBusyConnections()
getIncrConnections()
getMaxConnections()
getMinConnections()
getOpenConnections()
getPoolName()
getTimeOut()
setErrorOnBusy()
setPoolSize()
setTimeOut()
terminateConnection()
Date Class
Summary of Date Methods
addDays()
addMonths()
daysBetween()
fromBytes()
fromText()
getDate()
getSystemDate()
isNull()
lastDay()
nextDay()
operator=()
operator==()
operator!=()
operator>()
operator>=()
operator<()
operator<=()
setDate()
setNull()
toBytes()
toText()
toZone()
Environment Class
Summary of Environment Methods
createConnection()
createConnectionPool()
createEnvironment()
getCacheMaxSize()
getCacheOptSize()
getCurrentHeapSize ()
getMap()
getOCIEnvironment()
setCacheMaxSize()
setCacheOptSize()
terminateConnection ()
terminateConnectionPool()
terminateEnvironment()
IntervalDS Class
Summary of IntervalDS Methods
fromText()
getDay()
getFracSec()
getHour()
getMinute()
getSecond()
isNull()
operator*()
operator*=()
operator=()
operator==()
operator!=()
operator/()
operator/=()
operator>()
operator>=()
operator<()
operator<=()
operator-()
operator-=()
operator+()
operator+=()
set()
setNull()
toText()
IntervalYM Class
Summary of IntervalYM Methods
fromText()
getMonth()
getYear()
isNull()
operator*()
operator*=()
operator=()
operator==()
operator!=()
operator/()
operator/=()
operator>()
operator>=()
operator<()
operator<=()
operator-()
operator-=()
operator+()
operator+=()
set()
setNull()
toText()
Map Class
Summary of Map Methods
put()
MetaData Class
Summary of MetaData Methods
getAttributeCount()
getAttributeId()
getAttributeType()
getBoolean()
getInt()
getMetaData()
getNumber()
getRef()
getString()
getTimeStamp()
getUInt()
getVector()
operator=()
Number Class
Summary of Number Methods
abs()
arcCos()
arcSin()
arcTan()
arcTan2()
ceil()
cos()
exp()
floor()
fromBytes()
fromText()
hypCos()
hypSin()
hypTan()
intPower()
isNull()
ln()
log()
operator++()
operator++()
operator--()
operator--()
operator*()
operator/()
operator%()
operator+()
operator-()
operator-()
operator<()
operator<=()
operator>()
operator>=()
operator==()
operator!=()
operator=()
operator*=()
operator/=()
operator%=()
operator+=()
operator-=()
operator char()
operator signed char()
operator double()
operator float()
operator int()
operator long()
operator long double()
operator short()
operator unsigned char()
operator unsigned int()
operator unsigned long()
operator unsigned short()
power()
prec()
round()
setNull()
shift()
sign()
sin()
sqareroot()
tan()
toBytes()
toText()
trunc()
PObject Class
Summary of PObject Methods
flush()
getConnection()
getRef()
isLocked()
isNull()
lock()
markDelete()
markModified()
operator=()
operator delete()
operator new()
pin()
setNull()
unmark()
unpin()
Ref Class
Summary of Ref Methods
clear()
getConnection()
getRef()
isClear()
isNull()
markDelete()
operator->()
operator*()
operator==()
operator!=()
operator=()
ptr()
setPrefetch()
setLock()
setNull()
unmarkDelete()
RefAny Class
Summary of RefAny Methods
clear()
getConnection()
getRef()
isNull()
markDelete()
operator=()
operator==()
operator!=()
unmarkDelete()
ResultSet Class
ResultSet()
Summary of ResultSet Methods
cancel()
closeStream()
getBfile()
getBlob()
getBytes()
getCharSet()
getClob()
getColumnListMetaData()
getCurrentStreamColumn()
getCurrentStreamRow()
getCursor()
getDate()
getDatebaseNCHARParam()
getDouble()
getFloat()
getInt()
getIntervalDS()
getIntervalYM()
getMaxColumnSize()
getNumArrayRows()
getNumber()
getObject()
getRef()
getRowid()
getRowPosition()
getStatement()
getStream()
getString()
getTimestamp()
getUInt()
getVector()
getVectorOfRefs()
isNull()
isTruncated()
next()
preTruncationLength()
setBinaryStreamMode()
setCharacterStreamMode()
setCharSet()
setDatebaseNCHARParam()
setDataBuffer()
setErrorOnNull()
setErrorOnTruncate()
setMaxColumnSize()
status()
SQLException Class
SQLException()
Summary of SQLException Methods
getErrorCode()
getMessage()
setErrorCtx()
Statement Class
Summary of Statement Methods
addIteration()
closeResultSet()
closeStream()
execute()
executeArrayUpdate()
executeQuery()
executeUpdate()
getAutoCommit()
getBfile()
getBlob()
getBytes()
getCharSet()
getClob()
getConnection()
getCurrentIteration()
getCurrentStreamIteration()
getCurrentStreamParam()
getCursor()
getDatabaseNCHARParam()
getDate()
getDouble()
getFloat()
getInt()
getIntervalDS()
getIntervalYM()
getMaxIterations()
getMaxParamSize()
getNumber()
getObject()
getOCIStatement()
getRef()
getResultSet()
getRowid()
getSQL()
getStream()
getString()
getTimestamp()
getUInt()
getUpdateCount()
getVector()
getVectorOfRefs()
isNull()
isTruncated()
preTruncationLength()
registerOutParam()
setAutoCommit()
setBfile()
setBinaryStreamMode()
setBlob()
setBytes()
setCharacterStreamMode()
setCharSet()
setClob()
setDate()
setDatabaseNCHARParam()
setDataBuffer()
setDataBufferArray()
setDouble()
setErrorOnNull()
setErrorOnTruncate()
setFloat()
setInt()
setIntervalDS()
setIntervalYM()
setMaxIterations()
setMaxParamSize()
setNull()
setNumber()
setObject()
setPrefetchMemorySize()
setPrefetchRowCount()
setRef()
setRowid()
setSQL()
setString()
setTimestamp()
setUInt()
setVector()
setVectorOfRefs()
status()
Stream Class
Summary of Stream Methods
readBuffer()
readLastBuffer()
writeBuffer()
writeLastBuffer()
status()
Timestamp Class
Summary of Timestamp Methods
fromText()
getDate()
getTime()
getTimeZoneOffset()
intervalAdd()
intervalSub()
isNull()
operator=()
operator==()
operator!=()
operator>()
operator>=()
operator<()
operator<=()
setDate()
setNull()
setTimeZoneOffset()
subDS()
subYM()
toText()

Part III Appendix

A OCCI Demonstration Programs

OCCI Demonstration Programs
demo_rdbms.mk
occiblob.cpp
occiclob.cpp
occicoll.cpp
occidesc.cpp
occidml.cpp
occiinh.typ
occiinh.cpp
occiobj.typ
occiobj.cpp
occipobj.typ
occipobj.cpp
occipool.cpp
occiproc.cpp
occistre.cpp

Index


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 Index
Index

Master Index

Feedback