You are not logged in.
Some identified issues in Synopse Big Table have been corrected.
Packing and field record update will work as expected now.
Test coverage has been enhanced a lot, in order to avoid any regression about the issues you identified.
See http://synopse.info/fossil/info/a9d1df1d24
This was a major code correction, with some kind of deep rewrite of the updating mechanism.
For the end-user, the only change is that the AddField method won't return any TSynTableFieldProperties.
You'll have to code like this:
procedure TForm1.WriteExtraFields;
VAR
i: Integer;
Table: TSynBigTableRecord;
CurRec: TSynTableData;
NewField: TSynTableFieldProperties;
begin
{ Create table }
Table:= TSynBigTableRecord.Create('MyFirstDB.DB','Tabel1');
TRY
{ Define an extra fields/column to be added to the table }
Table.AddField ('bool', tftBoolean);
Table.AddFieldUpdate;
NewField:= Table.Table['bool'];
for i:= 1 to 10 DO
(....)
Not only update will work as expected, but it will be MUCH faster with a huge amount of records.
For the speed benchmark and regression tests, I always uses at least 1,000,000 records.
Offline
If I add more fields, I have to call Table.AddFieldUpdate after EACH AddField? Or just once, after all AddField calls is ok?
Last edited by newfedra (2011-02-21 20:59:48)
Offline
After all AddField calls, not after each AddField call.
As stated by the comment below:
(...)
// - warning: caller must call the AddFieldUpdate method when all
// AddField() methods have been called, in order to eventually process
// all already existing data to the resulting new field order
(...)
function AddField(const aName: RawUTF8; aType: TSynTableFieldType;
aOptions: TSynTableFieldOptions=[]): boolean;
I've modified the comment for AddFieldUpdate methods, which was not precise enough.
Thanks for the feedback.
Offline
>when all AddField() methods have been called
I imagined that but I had to be sure
Thanks.
Offline