S Select
Select records or rows matching a profile.
Modes
-
Mode 0—selects records that match the generated or specified profile from the table, and adds as many occurrences to the hitlist as the defined step size, or all of them if their number is less than the defined step size.
-
Mode 1—identical to mode 0, but does not add records to the hitlist.
-
Mode 2—returns 1 to Uniface if at least one record matches the profile. The connector does not add records to the hitlist.
-
Mode 3—selects the next step in the hitlist, selecting records that match the generated or specified profile from the table.
-
Mode 4—computes an aggregate request (for the selectdb ProcScript statement). The action to be taken depends on the capabilities of the DBMS. If the DBMS is capable of making the selection and computing the aggregate requests, it does both. If the DBMS is capable of making the selection but not of computing the aggregate request, the connector selects the fields specified and Uniface handles the rest. If the DBMS is not capable of making the selection, the connector selects all records in the table and Uniface handles the rest.
Conditions
The table that the Select is requesting is open.
Description
The Select request selects records from a table and adds them to the select cache, or selects their primary keys or physical record addresses and adds them to the hitlist, depending on the amount of data in each record. Uniface uses the stepped hitlist mechanism in many circumstances for selecting records from the database. The Select request can be called multiple times to pass the matching records in a number of steps. Either the DBMS or the connector maintains a state to determine which records must be added to the hitlist.
The result of a Select request varies between Uniface versions and operating systems. If a record is approximately half a kilobyte or smaller, Uniface uses the select cache mechanism. If larger, the hitlist mechanism is used.