#1 2011-02-16 10:17:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,550
Website

Synopse Big Table 1.12b - major bug fix

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

#2 2011-02-21 20:55:54

newfedra
Member
Registered: 2010-08-31
Posts: 14

Re: Synopse Big Table 1.12b - major bug fix

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

#3 2011-02-21 22:22:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,550
Website

Re: Synopse Big Table 1.12b - major bug fix

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

#4 2011-02-22 10:15:23

newfedra
Member
Registered: 2010-08-31
Posts: 14

Re: Synopse Big Table 1.12b - major bug fix

>when all AddField() methods have been called

I imagined that but I had to be sure smile
Thanks.

Offline

Board footer

Powered by FluxBB