Skip to content

Delay-loaded TDataset import #5

@davidberneda

Description

@davidberneda

A boolean parameter in TBIDB Import method to not load all Dataset records, but just create and return a TDataItem filled with the structure of the Dataset (fields and subfields).

In this delayed mode, records will be loaded just-in-time when they are necessary (for example when calculating a query or presenting the TDataItem on a grid or chart).

This mechanism is already working when loading TDataItem from a binary file or stream (mydata.databi) so it should be easy to implement for both TDataSet and TConnection sources. The only issue here is the source dataset might be closed or destroyed before data has been loaded, in that case the TDataItem should not attempt to load data and just keep itself empty.

Refreshing the data items is also very easy, just call MyData.UnloadData and the internal delay-load flag will be reset, the data item will be emptied, and it'll load a new refreshed copy of the database data the next time is necessary

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions