Search notes:

Oracle Data Cartridge Interfaces

ODCI Table interface (Pipelined and parallel table functions)

ODCITableDescribe Optional: used when structure of returned table is dynamic (i. e. table function returns a sys.anyDataSet). Invoked at SQL statement compile time.
ODCITablePrepare Optional: used to initialize scan context parameter («shared context»?) and additional table function info. This method is passed an instance of an odciTabFuncInfo object whose member retType is an anytype object that seems to have been constructed in ODCITableDescribe.
ODCITableStart Begin retrieving rows. Initializes the scan context parameters if (optional) ODCITablePrepare is not implemented.
ODCITableFetch Repeatedly called until desired result set is returned
ODCITableClose Clean up resources

Scan context

The scan context is the information that is required to be kept between calls of ODCITableFetch and passed as paramenter to ODCITableFetch()

Examples

A simple example for an implementation of the table interface is here (skeletton) and here (multiplication table).
Jon Heller's github repository method4.

Extensible Indexing Interface

ODCIGetInterfaces Returns the list of names (as ODCIObjectList) of the interfaces implemented by the type.
ODCIIndexAlter Called in response when index is rebuilt or renamed and/or alter index [partition], truncate table, rename table, alter table … [add|truncate|split|merge] … partition, alter table rename [column].
ODCIIndexClose
ODCIIndexCreate Creates the table to store the index data. The type of the first argument is ODCIIndexInfo and stores the index name, owner etc. See also ODCIIndexDrop.
ODCIIndexDelete
ODCIIndexDrop Drops the table that was crated when ODCIIndexCreate was invoked.
ODCIIndexExchangePartition
ODCIIndexFetch Repeatedly invoked to determine the rowids of the rows that satisfy the operator's predicate; returns a batch of ROWIDs of rows (parameter ODCIRidList) that match the operator predicate.
ODCIIndexGetMetadata Optional, used for the export utility.
ODCIIndexInsert
ODCIIndexStart Two definitions.
ODCIIndexUpdate
ODCIIndexUpdPartMetadata
ODCIIndexUtilCleanup
ODCIIndexUtilGetTableNames

User-Defined Aggregate Functions Interface

ODCIAggregateInitialize Initialize the aggregate-context. Called for each aggregation-group to create an instance of the implementation type, returned via an out parameter.
ODCIAggregateIterate Called for each non-null input-row.
ODCIAggregateMerge Merges two aggreagation contexts into a single one (serial or parallel evaluation)
ODCIAggregateTerminate Clean up and return aggregated value for group.
ODCIAggregateWrapContext
ODCIAggregateDelete Remove an input-value from the current group.
See also Using Oracle Data Cartridge Interface for User Defined Aggragation Functions

User defined ODCI stats function

ODCIGetInterfaces
ODCIStatsCollect
ODCIStatsDelete
ODCIStatsFunctionCost
ODCIStatsExchangePartition
ODCIStatsIndexCost
ODCIStatsSelectivity
ODCIStatsTableFunction
ODCIStatsUpdPartStatistics

ODCI Objects

select
   object_type,
   object_name
from
   dba_objects
where
   object_name like 'ODCI%'
order by
   object_type,
   object_name;

Types

ODCIARGDESC
ODCIARGDESCLIST
ODCIBFILELIST
ODCICOLARRAYVALLIST
ODCICOLINFO Information about a column used in an index. See also ODCIColInfoList.
ODCICOLINFOLIST A varray of ODCIColInfo and thus contains information about an index's columns, see also ODCIIndexInfo.
ODCICOLINFOLIST2
ODCICOLVALLIST
ODCICOMPQUERYINFO
ODCICOST
ODCIDATELIST
ODCIENV Four attributes: envFlags, callProperty, debugLevel and cursorNum, all of which are numbers.
ODCIEXTTABLEINFO
ODCIEXTTABLEQCINFO
ODCIFILTERINFO
ODCIFILTERINFOLIST
ODCIFUNCCALLINFO
ODCIFUNCINFO
ODCIGRANULELIST
ODCIINDEXCTX An object that has three attributes: indexInfo (which is an instance of ODCIIndexInfo), rid (which is a varchar2, probably used to store a rowid?) and queryInfo (which is an instance of ODCIQueryInfo).
ODCIINDEXINFO Stores information about an index. The member indexCols (ODCIColInfoList) has information about the index's columns. ODCIIndexInfo is used in index management related functions such as ODCIIndexCreate, ODCIIndexDrop and ODCIIndexTruncate, ODCIIndexInsert, ODCIIndexDelete, ODCIIndexUpdate, ODCIIndexStart (and possibly others, too?). See also ODCIIndexCtx and ODCIIndexInfoDump.
ODCINUMBERLIST
ODCINUMBERLIST2
ODCIOBJECT Stores an object's name and schema name (thus identifies an object). See also ODBObjectList.
ODCIOBJECTLIST A varray of ODCObject, used in ODCIGetInterfaces
ODCIORDERBYINFO
ODCIORDERBYINFOLIST
ODCIPARTINFO
ODCIPARTINFOLIST
ODCIPREDINFO
ODCIQUERYINFO See also ODCIIndexInfo
ODCIRAWLIST
ODCIRIDLIST varray(32767) of varchar2(5072 byte); out paramter of ODCIIndexFetch, ODCIIndexInsert, ODCIIndexDelete and ODCIIndexUpdate. (MX_UROWID_S Z= 3800(Max UROWID)*4/3(URWOIDR2Char ovhd)= 5066.67 < 5072)
ODCISECOBJ
ODCISECOBJTABLE
ODCISTATSOPTIONS
ODCITABFUNCINFO
ODCITABFUNCSTATS
ODCIVARCHAR2LIST

Packages

ODCICONST A package without body, used to define constants (such as odciConst.success, odciConst.error etc.)

Procedures

ODCIANYDATADUMP
ODCICOLINFODUMP
ODCICOLINFOFLAGSDUMP
ODCIENVDUMP
ODCIINDEXALTEROPTIONDUMP
ODCIINDEXCALLPROPERTYDUMP
ODCIINDEXINFODUMP Dumps the content of an instance of ODCIIndexInfo (using dbms_output ?).
ODCIINDEXINFOFLAGSDUMP
ODCIPARTINFODUMP
ODCIPARTINFOLISTDUMP
ODCIPREDINFODUMP
ODCIQUERYINFODUMP
ODCISTATSOPTIONSDUMP
ODCITABFUNCINFODUMP

Tables

ODCI_PMO_ROWIDS$ Used for local text index maintenance during alter table partition maintenance operations (PMO).
ODCI_SECOBJ$ Import transportable tablespaces
ODCI_WARNINGS$ Warnings (line number and text) for end user.
All three tables are global temporary tables.

Libraries

ODCI_EXTOPT_LIB
ODCI_INDEX_LIB
ODCI_OBJ_LIB

Synonyms

ODCICONST

Index