Oracle 8i Data Cartridge Developer's Guide Release 2 (8.1.6) Part Number A76937-01 |
|
Reference: Extensibility Constants, Types, & Mappings, 2 of 2
This chapter first describes System Defined Constants and System Defined Types. Both of these apply generically to all supported languages. Next, in three subsections, this chapter describes mappings that are specific to the PL/SQL, C, and Java languages.
All the constants referred to in this chapter are defined in the ODCIConst
package installed as part of the catodci.sql script. There are equivalent definitions for use within C routines in odci.h.
We strongly recommend that you use these constants instead of hard coding their underlying values in your routines.
PredExactMatch
PredPrefixMatch
PredIncludeStart
PredIncludeStop
PredObjectFunc
PredObjectPkg
PredObjectType
A number of system-defined types are defined by Oracle and need to be created by running the catodci.sql catalog script. The C mappings for these object types are defined odci.h The ODCIIndex
routines use these types as parameters, and ODCIStats described in Chapters 16 and 17.
Unless otherwise mentioned, the names parsed as type attributes are unquoted identifiers.
ODCIArgDesc
Object type.
Stores function/operator arguments.
Name | Datatype | Purpose |
---|---|---|
ArgType |
NUMBER |
Argument type - see "ODCICost" |
TableName |
|
Name of table |
TableSchema |
|
Schema containing the table |
ColName |
|
Name of column. This could be top level column name such as "A", or a nested column "A"."B" Note that the column name are quoted identifiers. |
ODCIArgDesc
VARRAY(32767) of ODCIArgDesc
Lists descriptions of arguments.
ODCIRidList
VARRAY(32767) OF VARCHAR2("M_URID_SZ")
Stores list of rowids. The rowids are stored in their character format.
ODCIColInfo
Object type.
Stores information related column.
ODCIColInfoList
VARRAY(32) OF ODCIColInfo
Stores information related to a list of columns.
ODCICost
Object type.
Stores cost information.
Name | Datatype | Purpose |
---|---|---|
CPUCost |
NUMBER |
CPU cost |
IOCost |
NUMBER |
I/O cost |
NetworkCost |
NUMBER |
Communication cost |
ODCIFuncInfo
Object type.
Stores function information.
ODCIIndexInfo
Object type
Stores the metadata information related to a domain index. It is passed as a parameter to all ODCIIndex
routines.
Name | Datatype | Purpose |
---|---|---|
IndexSchema |
|
Schema containing domain index |
IndexName |
|
Name of domain index |
IndexCols |
ODCIColInfoList |
List of indexed columns |
ODCIPredInfo
Object type
Stores the metadata information related to a predicate containing a user-defined operator or function. It is also passed as a parameter to ODCIIndexStart
() query routine.
ODCIIndexCtx
Object type
Stores the index context, including the domain index metadata and the ROWID
. It is passed as parameter to the functional implementation of an operator that expects index context.
Name | Datatype | Purpose |
---|---|---|
|
|
Stores the metadata information about the domain index |
|
|
Row identifier of the current row |
ODCIObject
Object type
Stores information about a schema object.
Name | Datatype | Purpose |
---|---|---|
|
|
Name of schema in which object is located |
|
|
Name of object |
ODCIObjectList
VARRAY(32) OF ODCIObject
Stores information about a list of schema objects.
ODCIQueryInfo
Object type
Stores information about the context of a query. It is passed as a parameter to the ODCIIndexStart
routine.
ODCIStatsOptions
Object type.
Stores options information for ANALYZE.
Name | Datatype | Purpose |
---|---|---|
Sample |
NUMBER |
Sample size |
Options |
NUMBER |
ANALYZE options - see "ODCICost" |
Flags |
NUMBER |
ANALYZE flags - see "ODCICost" |
A variety of PL/SQL mappings are common to both Extensible Indexing and the Extensible Optimizer.
Mappings for C are defined in the public header file odci.h
Constants for C are defined as macros in odci.h.
Structures are defined in odci.h. Note that each structure has a corresponding indicator structure called structname_ind, and a reference definition called structname_ref.
The following constants create or replace the ODCIConst IS
package.
To ensure that the database or packet state are not inadvertently corrupted, the following statement is always used with these methods to restrict reads and writes:
pragma restrict_references(ODCIConst, WNDS, RNDS, WNPS, RNPS);
Success CONSTANT INTEGER := 0; Error CONSTANT INTEGER := 1; Warning CONSTANT INTEGER := 2;
PredExactMatch CONSTANT INTEGER := 1; PredPrefixMatch CONSTANT INTEGER := 2; PredIncludeStart CONSTANT INTEGER := 4; PredIncludeStop CONSTANT INTEGER := 8; PredObjectFunc CONSTANT INTEGER := 16; PredObjectPkg CONSTANT INTEGER := 32; PredObjectType CONSTANT INTEGER := 64;
QueryFirstRows CONSTANT INTEGER := 1; QueryAllRows CONSTANT INTEGER := 2; QuerySortAsc CONSTANT INTEGER := 4; QuerySortDesc CONSTANT INTEGER := 8; QueryBlocking CONSTANT INTEGER := 16;
CleanupCall CONSTANT INTEGER := 1; RegularCall CONSTANT INTEGER := 2;
ObjectFunc CONSTANT INTEGER := 1; ObjectPkg CONSTANT INTEGER := 2; ObjectType CONSTANT INTEGER := 4;
ArgOther CONSTANT INTEGER := 1; ArgCol CONSTANT INTEGER := 2; ArgLit CONSTANT INTEGER := 3; ArgAttr CONSTANT INTEGER := 4; ArgNull CONSTANT INTEGER := 5;
PercentOption CONSTANT INTEGER := 1; RowOption CONSTANT INTEGER := 2;
EstimateStats CONSTANT INTEGER := 1; ComputeStats CONSTANT INTEGER := 2; Validate CONSTANT INTEGER := 4;
AlterIndexNone CONSTANT INTEGER := 0; AlterIndexRename CONSTANT INTEGER := 1; AlterIndexRebuild CONSTANT INTEGER := 2;
The ODCI (Oracle Data Cartridge Interface) interfaces are described in the Oracle8i Supplied Java Packages Reference., To use these classes, they must first be loaded. See Chapter 14 for loading instructions.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|