#1 2012-11-30 16:21:54

lideshi
Member
Registered: 2012-11-24
Posts: 8

Map whole row to a record?

I was wondering if it's possible for to store the whole row from BigTable and map it to a record type.

For example:

type SampleRecord = record
  Name : String;
  Age : Integer;
  Color : String;
end;

var
  MyRecord : SampleRecord;

MyRecord := BigTable.RecordGet(tIndex);

This should dramatically improve speed instead of getting field by field.

Thanks

Offline

#2 2012-11-30 17:42:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,165
Website

Re: Map whole row to a record?

You can do this by using the RecordLoad() / RecordSave() methods of SynCommons.pas.
See http://blog.synopse.info/post/2011/03/1 … -fast-RTTI

Offline

Board footer

Powered by FluxBB