TCriteriaSource Class
A Aurelius.Bind.BaseDataset.TObjectSource that fetches entity objects from the database in pages using a TCriteria query.
Remarks
When a page size greater than zero is specified, records are fetched in batches.
Each batch triggers a new database query using TCriteria.Skip and TCriteria.Take. This provides offline fetch-on-demand without keeping a persistent database connection open between pages. The criteria objects are owned and destroyed by this source.
Syntax
Unit: Aurelius.Bind.Dataset
TCriteriaSource = class(TObjectSource);
Constructors
| Name | Description |
|---|---|
| Create | Creates a new criteria source with the specified query and page size. |
Destructors
| Name | Description |
|---|---|
| Destroy | Destroys this source and frees the owned criteria objects. |
Methods
| Name | Description |
|---|---|
| CanRetrieveRecord​Count | Indicates that this source supports retrieving the total record count. |
| Fetching | Indicates whether more pages remain to be fetched from the database. |
| FetchMore | Fetches the next page of objects from the database into the supplied list. |
| ObjectClass | Returns the entity class of objects produced by the underlying criteria query. |
| RetrieveRecordCount | Executes a COUNT(*) query to retrieve the total number of records that match the criteria, without fetching the records themselves. |