Home |
Previous Page | Next Page Access Methods > Access Method Flow >
A query proceeds as follows for the super_access access
method, which has only an am_getnext purpose
function:
- The access method am_getnext purpose function, get_next_record(),
uses DataBlade API functions to the initiate callback functions for error
handling.
- The database server prepares a table descriptor to identify
the table that the query specifies, a scan descriptor to describe
the query projection, and a qualification descriptor to describe
the query selection criteria.
- The database server passes a pointer to the scan descriptor
through the get_next_record() to the access
method. The scan descriptor, in turn, points to the table descriptor
and qualification descriptor in shared memory.
- The access method get_next_record() function
takes the following actions:
- Calls VTI accessor functions to retrieve
the table description and then calls DataBlade API functions to open that
table
- Calls accessor functions to retrieve the query projection and
selection criteria from the scan and qualification descriptors
- Calls the DataBlade API function (usually mi_dalloc())
to allocate memory for a user-data structure to hold the current
virtual-table data
- Begins its scan
- Each time that the access method retrieves a qualifying record,
it calls a DataBlade API function, mi_row_create(),
to create an IBM Informix-formatted row from the raw data.
- The database server executes get_next_record() to
continue scanning until get_next_record() returns MI_NO_MORE_RESULTS to
indicate to the database server that the access method has returned
every qualifying row.
- The access method calls a DataBlade API function to close the table
and release any allocated memory.
- The database server reports the results to the user or application
that initiated the query.
The steps in the preceding example illustrate the interaction
between the database server, the access method, and the DataBlade API.
Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]