[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TIndexDefs

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

A class to keep a list of index definitions

## Declaration

Source position: db.pas line 948

`type TIndexDefs = class(TDefCollection)`
`public`
`constructor Create(); virtual; overload;` |  | Create a new TIndexDefs instance
`destructor Destroy; override;` |  | Remove the indexdefs from memory.
`procedure Add();` |  | Add a new index definition with given name and options
`function AddIndexDef;` |  | Add a new, empty, index definition
`function Find();` |  | Find an index by name
`function FindIndexForFields();` |  | Find index definition based on field names
`function GetIndexForFields();` |  | Get index definition based on field names
`procedure Update; virtual; overload;` |  | Called whenever one of the items changes
`property Items: TIndexDef; default; [rw]` |  | Indexed access to the index definitions
`end;`

## Inheritance

`TIndexDefs` |  | A class to keep a list of index definitions
`TDefCollection` |  | Definition collection
`TOwnedCollection`
`TCollection`
`TPersistent`
`TObject`

## Description

TIndexDefs is used to keep a collection of index (sort order) definitions. It can be used by classes that provide in-memory or on-disk indexes to provide a list of available indexes.

## See also

The latest version of this document can be found at lazarus-ccr.sourceforge.net .