Execute purpose functions
When an SQL statement or oncheck command specifies a virtual table, the database server executes one or more access-method purpose functions.
A single SQL command might involve a combination of the
following purposes:
- Open a connection, file, or smart large object
- Create a table
- Scan and select data
- Insert, delete, or update data
- Drop a table
- Close the connection, file, or smart large object
A single oncheck request requires at
least the following actions:
- Open a connection, file, or smart large object
- Check the integrity of a table
- Close the connection, file, or smart large object
The example in Table 2 specifies
only the am_getnext purpose for the super_access access
method. A SELECT statement on a virtual-table that uses super_access initiates
the following database server actions:
- Gets the function name for am_getnext that the super_access entry in sysams specifies; in this case get_next_record().
- Gets the external file name of the executable file from the get_next_record() entry
in the sysprocedures catalog.The CREATE FUNCTION statement assigns the executable file as follows:
Operating system External executable-file name UNIX or Linux $INFORMIXDIR/extend/am_lib.bld(get_next_record) Windows %INFORMIXDIR%\extend\am_lib.bld(get_next_record) - Allocates memory for the descriptors that the database server passes by reference through get_next_record() to the access method.
- Executes the am_getnext purpose function, get_next_record().