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.

OTT Utility Datatype Mappings<br />

Use quotation marks, such as TYPE "Person" to reference SQL identifiers that<br />

have been created in a case sensitive manner, for example, CREATE TYPE<br />

"Person". A SQL identifier is case sensitive if it was quoted when it was declared.<br />

Quotation marks can also be used to refer to a SQL identifier that is an<br />

OTT-reserved word, for example, TYPE "CASE". In this case, the quoted name<br />

must be in uppercase if the SQL identifier was created in a case insensitive manner,<br />

for example, CREATE TYPE Case. If an OTT-reserved word is used to refer to the<br />

name of a SQL identifier but is not quoted, then the OTT utility will report a syntax<br />

error in the INTYPE file.<br />

See Also:<br />

OTT Utility Datatype Mappings<br />

When the OTT utility generates a C structure or a <strong>C++</strong> class from a database type,<br />

the structure or class contains one element corresponding to each attribute of the<br />

object type. The datatypes of the attributes are mapped to types that are used in<br />

<strong>Oracle</strong> object data types. The datatypes found in <strong>Oracle</strong> include a set of predefined,<br />

primitive types and provide for the creation of user-defined types, like object types<br />

and collections.<br />

The set of predefined types includes standard types that are familiar to most<br />

programmers, including number and character types. It also includes large object<br />

datatypes (for example, BLOB or CLOB).<br />

<strong>Oracle</strong> also includes a set of predefined types that are used to represent object type<br />

attributes in C structures or <strong>C++</strong> classes. As an example, consider the following<br />

object type definition, and its corresponding OTT-generated structure declarations:<br />

CREATE TYPE employee AS OBJECT<br />

( name VARCHAR2(30),<br />

empno NUMBER,<br />

deptno NUMBER,<br />

hiredate DATE,<br />

salary$ NUMBER);<br />

7-16 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong><br />

■ "Structure of the INTYPE File" on page 7-127 for a more<br />

detailed specification of the structure of the INTYPE file and the<br />

available options.<br />

■ "CASE Parameter" on page 7-119 for further information<br />

regarding the CASE parameter

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

Saved successfully!

Ooh no, something went wrong!