The TabularData class (from System.Data.Tabular) provides a high-performance way to work with large, column-oriented datasets. It is ideal for data analysis and reporting.
TabularData supports JIT-compiled expressions for adding columns and calculating aggregates, allowing it to process millions of rows per second.
uses System.Data.Tabular;
var data := new TabularData;
data.AddColumn('Quantity', [10, 20, 30]);
data.AddColumn('Price', [5.5, 10.0, 7.25]);
// JIT-compiled expression (using RPN opcodes)
data.EvaluateNewColumn('Total', [ '"Quantity"', '"Price"', '*' ]); In a web environment, you can load a dataset once and share it across all requests using LockAndShare. This drastically reduces memory usage and startup time for data-heavy applications.
uses System.Data.Tabular;
var sharedData := TabularData.ConnectToShared('AppWideData');
if sharedData = nil then begin
// Load data and share it
end; For a complete list of aggregation functions and sharing options, see the reference documentation: