TDataItem structures using Delphi’s RTTI (Run-Time Type Information).
Quick Start
TTypeProvider
The generic provider for typeT:
Constructor
Adding Data
Add Single Item
Add Array
Add TList
Add TCollection
Reading Data
Array Access
Count
Data Manipulation
Find
Find item in data:Update
Replace item at index:Delete
Remove item at index:Remove
Remove specific item:Clear
Remove all data:Advanced Configuration
Visibility
Control which members are mapped:Member Types
Complex Types
Nested Records
Arrays in Records
Classes
Primary Keys
Designate primary key fields:- Faster lookups
- Duplicate detection
- Automatic indexing
Type Mapping
Automatic mapping from Delphi types to TDataKind:| Delphi Type | TDataKind |
|---|---|
| Integer | dkInt32 |
| Int64 | dkInt64 |
| Single | dkSingle |
| Double | dkDouble |
| Extended | dkExtended |
| String | dkText |
| Boolean | dkBoolean |
| TDateTime | dkDateTime |
| TDate | dkDateTime |
| TTime | dkDateTime |
Complete Example
Performance Tips
- Batch Operations: Use array/list Add for better performance
- Pre-allocate: Create provider with initial data
