Passing Definitions to the DBMS Server

This chapter describes how definitions are passed to the DBMS Server.

Previous Topic

Next Topic

IIudadt_register Routine

The DBMS Server accesses user-written code for new data types, functions, and operator capabilities by calling the routine IIudadt_register. This routine, which you must provide, is called at system startup. It fills in a pointer to a data structure that contains the definitions of any user-written data types, functions and function instances. The DBMS Server checks the definitions to ensure that they are correct and merges them with the existing data type manipulation objects.

This routine is called using the following syntax:

status=IIudadt_register(add_block);

Status has the data type II_STATUS. Add_block is a pointer to a field that must be set to point to a data structure of type IIADD_DEFINITION if you are adding new data types, functions, or function instances. If you are not adding new data types (or functions or function instances), set this pointer to zero. This is the default.

Note: If provided, IIADD_DEFINITION exists as a compiler-generated data area. Do not dynamically allocate this data area or place it on the stack.

Previous Topic

Next Topic

Structure IIADD_DEFINITION Fields

The fields in the IIADD_DEFINITION data structure are as follows:

Previous Topic

Next Topic

Server Routines Provided

A number of routines are provided for you to use through the callback block. When you use one of these functions, save the addresses of the routines used in your code before IIudadt_register() returns. After IIudadt_register() completes, the call_back_block address is no longer valid.

These routines all return II_STATUS values that specify their completion status.

Previous Topic

Next Topic

The ii_cb_trace Routine—Output Provided Trace Messages

The ii_cb_trace routine outputs trace messages provided to it. The parameters for this routine are as follows:

Note: If II_DBMS_LOG is defined, messages going to the error log also appear in the trace log.

Previous Topic

Next Topic

The ii_error_fcn Routine—Place Error Information in Status Control Block

This routine places error information in the status control block (scb). As a result, you do not need to know the internal scb format. The parameters for this routine are as follows:

Previous Topic

Next Topic

The ii_lo_handler_fcn Routine—Move Through Large Object Segments

You can use this routine to move through large object segments. It is called with two arguments: an operation code, and a pointer to a pop_cb (peripheral operations control block). For details, see Large Objects and the Methods for Defining Function Instances for Large Objects.

Previous Topic

Next Topic

The ii_init_filter_fcn Routine—Set Up Filter Function

This routine sets up the filter function for large objects. It is called with three arguments: a pointer to an scb, a pointer to an II_DATA_VALUE that describes the large object being input, and a pointer to an II_DATA_VALUE that describes the workspace provided. For details, see Large Objects and Methods for Defining Function Instances for Large Objects.

Previous Topic

Next Topic

The ii_filter_fcn Routine—Perform Operation by Calling a User Routine

This routine performs an operation by calling back a user routine for each segment in the input object. It is called with the following arguments:

For details, see Large Objects and Methods for Defining Function Instances for Large Objects.


© 2007 Ingres Corporation. All rights reserved.