10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Overview of Associative Access<br />

Maximum cache size = optimal_size + optimal_size * max_size_percentage / 100<br />

The default value for the maximum cache size percentage is 10%. The default value<br />

for the optimal cache size is 8MB.<br />

These parameters can be set or retrieved using the following member functions of<br />

the Environment class:<br />

■ void setCacheMaxSize(unsigned int maxSize);<br />

■ unsigned int getCacheMaxSize() const;<br />

■ void setCacheOptSize(unsigned int OptSize);<br />

■ unsigned int getCacheOptSize() const;<br />

See Also:<br />

Overview of Associative Access<br />

You can employ SQL within OCCI to retrieve objects, and to perform DML<br />

operations:<br />

■ Using SQL to Access Objects<br />

Using SQL to Access Objects<br />

■ Chapter 8, "OCCI Classes and Methods" for details.<br />

■ Inserting and Modifying Values<br />

See Also:<br />

■ Appendix A, "OCCI Demonstration Programs" and the code<br />

examples occiobj.typ and occiobj.cpp for an illustration of the<br />

concepts covered in this section<br />

In the previous sections we discussed navigational access, where SQL is used only<br />

to fetch the references of an initial set of objects and then navigate from them to the<br />

other objects. Here we will discuss how to fetch the objects using SQL.<br />

The following example shows how to use the ResultSet::getObject method to<br />

fetch objects through associative access where it gets each object from the table,<br />

addr_tab, using SQL:<br />

string sel_addr_val = "SELECT VALUE(address) FROM ADDR_TAB address";<br />

Object Programming 3-13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!