Class tlocalindex

Unit

Declaration

type tlocalindex = class(townedpersistent)

Description

Warning: iterating with next in a loop that also posts changes to a field that belongs to the currently active local index is unsafe — posting such a change reorders the record within that index, so the iteration can skip or revisit records. This is safe only if the posted changes do not touch a field of the active index (e.g. by temporarily deactivating the index, or using a different one for the iteration than the one being modified).

Hierarchy

Overview

Methods

Protected procedure change;
Public constructor create(aowner: tobject); override;
Public destructor destroy; override;
Public function find(const avalues: array of const; const aisnull: array of boolean; out abookmark: bookmarkdataty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;
Public function find(const avalues: array of const; const aisnull: array of boolean; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;
Public function findvariant(const avalue: array of variant; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;
Public function find(const avalues: array of tfield; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;
Public function find(const avalues: array of tfield; out abookmark: bookmarkdataty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;
Public function find(const avalues: array of const; const aisnull: array of boolean; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;
Public function find(const avalues: array of tfield; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;
Public function findvariant(const avalue: array of variant; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;
Public function unique(const avalues: array of const): boolean;
Public procedure deleteduplicates();
Public function getbookmark(const arecno: integer): bookmarkty;

Properties

Public property desc: boolean read getdesc write setdesc;
Public property default: boolean read getdefault write setdefault;
Published property fields: tindexfields read ffields write setfields;
Published property options: localindexoptionsty read foptions write setoptions default [];
Published property active: boolean read getactive write setactive default false;
Published property name: string read fname write fname;

Description

Methods

Protected procedure change;

This item has no description.

Public constructor create(aowner: tobject); override;

This item has no description.

Public destructor destroy; override;

This item has no description.

Public function find(const avalues: array of const; const aisnull: array of boolean; out abookmark: bookmarkdataty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;

Looks up a row by the values of an index, faster than tdataset.locate on a large table since it uses the index instead of a sequential scan. aisnull defines the null state of each search field; abigger selects the nearest bigger match if the exact value is not found, otherwise the nearest lower one; partialstring allows a partial (prefix) match on string values.

Public function find(const avalues: array of const; const aisnull: array of boolean; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;

This item has no description.

Public function findvariant(const avalue: array of variant; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;

This item has no description.

Public function find(const avalues: array of tfield; out abookmark: bookmarkty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;

This item has no description.

Public function find(const avalues: array of tfield; out abookmark: bookmarkdataty; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const filtered: boolean = false): boolean; overload;

This item has no description.

Public function find(const avalues: array of const; const aisnull: array of boolean; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;

This item has no description.

Public function find(const avalues: array of tfield; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;

This item has no description.

Public function findvariant(const avalue: array of variant; const abigger: boolean = false; const partialstring: boolean = false; const nocheckbrowsemode: boolean = false; const exact: boolean = true; const filtered: boolean = true): boolean; overload;

This item has no description.

Public function unique(const avalues: array of const): boolean;

This item has no description.

Public procedure deleteduplicates();

This item has no description.

Public function getbookmark(const arecno: integer): bookmarkty;

Returns the bookmark of the record at position arecno in this index's order — the index does not need to be the active one, and the returned bookmark is valid in any index of the dataset. Useful to look up a record by an alternate ordering without having to activate that index first.

Properties

Public property desc: boolean read getdesc write setdesc;

This item has no description.

Public property default: boolean read getdefault write setdefault;

This item has no description.

Published property fields: tindexfields read ffields write setfields;

This item has no description.

Published property options: localindexoptionsty read foptions write setoptions default [];

This item has no description.

Published property active: boolean read getactive write setactive default false;

This item has no description.

Published property name: string read fname write fname;

This item has no description.


Generated by PasDoc 1.0.4.