Home | Previous Page | Next Page   Access Methods > Access-Method Components >

Components That You Provide

As the developer of a user-defined access method, you design, write, and test the following components:

Purpose Functions

A purpose function is a UDR that can interpret the user-defined structure of a virtual index. You implement purpose functions in C to build, connect, populate, query, and update indexes. The interface requires a specific purpose-function syntax for each of several specific tasks.

Tip:
To discuss the function call for a given task, this manual uses a column name from the sysams system catalog table as the generic purpose-function name. For example, this manual refers to the UDR that builds a new index as am_create. The am_create column in sysams contains the registered UDR name that the database server calls to perform the work of am_create.

Table 4 shows the task that each purpose function performs and the reasons that the database server invokes that purpose function. In Table 4, the list groups the purpose functions as follows:

For more information about purpose functions, refer to the following chapters:

User-Defined Routines and Header Files

The database server calls a purpose function to initiate a specific task. Often, the purpose function calls other modules in the access-method library. For example, the scanning, insert, and update purpose functions might all call the same UDR to check for valid data type.

A complete access method provides modules that convert data formats, detect and recover from errors, commit and roll back transactions, and perform other tasks. You provide the additional UDRs and header files that complete the access method.

Operator Class

The functions that operate on index keys of a particular data type make up an operator class. The operator class has two types of functions:

The unique operator-class name provides a way to associate different kinds of operators with different secondary access methods.

You designate a default operator class for the access method. If a suitable operator class exists in the database server, you can assign it as the default. If not, you program and register your own strategy and support functions and then register an operator class.

For more information about operator classes, strategy functions, and support functions, refer to IBM Informix: User-Defined Routines and Data Types Developer's Guide.

User Messages and Documentation

You provide messages and a user guide that help end users apply the access method in SQL statements and interpret the results of the oncheck utility.

A user-defined access method alters some of the functionality that the database server manuals describe. The documentation that you provide details storage-area constraints, deviations from the IBM Informix implementation of SQL, configuration options, data types, error messages, backup procedures, and extended features that the IBM Informix documentation library does not describe.

For samples of user documentation that you must provide, refer to Supplying Error Messages and a User Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]