Index Functions and Methods

Alpha Five provides the following Index functions.

Function

 

Description

Keylist Formats

V5

Rules for formatting keys.

*IBOF()

V5

Returns True (.T.) if the current record is also the first record of the current index.

A5_CHECKINDEXESDIALOG()

V5

Displays the Check Indexes dialog box.

A5_EDIT_INDEXES()

V5

Displays the Index Builder dialog box for the selected table.

CREATE_INDEXES()

V6

Creates indexes for a table based on a CR-LF delimited list created by GET_INDEX_DEFINITIONS().

CROSSLEVEL_RECORD_LIST()

V5

Uses the <INDEX>.RECNO_LIST_GET() method to set the current filter for the current table and retrieve the specified set of records.

EXIST()

V5

Returns .T. (TRUE) if the Key_Value exists in the Index_Name index.

GET_INDEX_DEFINITIONS()

V6

Returns a CR-LF delimited string of the definitions of all indexes (i.e. index tags) for a table.

INDEXES_MATCH_DEFSTRING()

V6

Checks the indexes in a table and compares them against a previously created index definition string.

KEYLIST_BUILD()

V5

Returns a specially formatted list for display of advanced record lists in an Xdialog form.

KEY_EXIST()

V5

Returns TRUE if Key_Value is found in index Index_Name ; otherwise, it returns FALSE.

KEY_UNIQUE

V5

Searches an index ( Index_Name ) to see if the key value for the current record already exists. If the key is unique, then Key_Exist_Flag is TRUE; otherwise, it is FALSE.

INVERT()

V5

Returns the complement of the value in the field specified by Field_Name.

Use <TBL>.INDEX_PRIMARY_GET() to return the <INDEX> object pointer that references the primary index or query list of the table referenced by <TBL>. Prefix the following methods with the name of the <INDEX> object pointer.

Function

 

Description

.CLASS()

V5

Returns the class name.

.CLOSE()

V5

Closes an index file or query list.

.DROP()

V5

Deletes the index, or query list.

.FILENAME_GET()

V5

Returns the filename of the index file.

.FILTER_GET()

V5

Returns the filter expression for the index

.FIND()

V5

Find and return a key in the index.

.FIND_FIRST()

V5

Returns the first key value.

.FIND_LAST()

V5

Returns the last key value.

.FIND_NEXT()

V5

Finds and returns the key after the specified key.

.FIND_PREVIOUS()

V5

Finds and returns the key before the specified key.

.FLAGS_GET()

V5

Returns the index flags for the index .

.IS_VALID()

V5

Returns .T. (TRUE) if the current index is valid.

.KEY_GET()

V5

Returns the current key value.

.KEY_LIST_GET()

V5

Returns a CR-LF delimited list of keys from the head or tail of the index or query.

.NAME_GET()

V5

Returns the Tag Name of the index or the description of a query list.

.ORDER_GET()

V5

Returns the order expression for the index.

.PERSIST()

V5

Sets a flag to indicate that a query that is used as an index should be preserved.

.RECNO_LIST_GET()

V5

Creates a record list that contains Count records numbers from the index or query list.

.RECORDS_GET()

V5

Retrieves the number of records selected by the specified index tag or query list.

.REFRESH()

V5

Refreshes a query if the table the query is based on has changed. The method returns TRUE if rebuild was needed.

.TABLE_GET()

V5

Returns the table that the index is based on.

.TYPE_GET()

V5

Returns the type of the index.

.UPDATE()

V5

Updates all of the indexes in an index file.

See Also

Table Functions and Methods, Query Functions and Methods