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

# TIndexDef

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

Index definition

## Declaration

Source position: db.pas line 971

`type TIndexDef = class(TNamedItem)`
`protected`
`procedure Assign(); override;`
`function GetExpression;`
`procedure SetCaseInsFields(); virtual;`
`procedure SetDescFields();`
`procedure SetExpression();`
`public`
`constructor Create(); overload;` |  | Create a new index definition
`destructor Destroy; override;` |  | Remove the index from memory
`property Expression: String; [rw]` |  | Expression that makes up the index values
`property Fields: String; [rw]` |  | Fields making up the index
`property CaseInsFields: String; [rw]` |  | Fields in field list that are ordered case-insensitively
`property DescFields: String; [rw]` |  | Fields in field list that are ordered descending
`property Options: TIndexOptions; [rw]` |  | Index options
`property Source: String; [rw]` |  | Source of the index
`end;`

## Inheritance

`TIndexDef` |  | Index definition
`TNamedItem` |  | Named collection item
`TCollectionItem`
`TPersistent`
`TObject`

## Description

TIndexDef describes one index in a set of indexes of a TDataset instance. The collection of indexes is descibed by the TIndexDefs class. It just has the necessary properties to describe an index, but does not implement any functionality to maintain an index.

## See also

TIndexDefs |  | A class to keep a list of index definitions

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