Skip to content

TIndexDefs.FindIndexForFields

Find index definition based on field names.

Declaration

Source position: db.pas line 1286

public 
function TIndexDefs.FindIndexForFields(const Fields: string) : TIndexDef;

Description

FindIndexForFields searches in the list of indexes for an index whose TIndexDef.Fields property matches the list of fields in Fields. If it finds an index definition, then it returns the found instance.

Errors

If no matching definition is found, an exception is raised. This is different from other Find functionality, where Find usually returns Nil if nothing is found.

See also

Name Description
TIndexDef Index definition.
TIndexDefs.Find Find an index by name.
TIndexDefs.GetindexForFields Get index definition based on field names.