Micha Nelissen escreveu:
On Sat, 01 Apr 2006 18:06:31 +0200
Joost van der Sluis <[EMAIL PROTECTED]> wrote:

Further I have a question: now sqldb uses a linked-list record buffer,
the RecordCount and RecNo properties are something strange.

What should I do with recordcount? I can add a counter which keep track
of the recordcount. Ie: it does inc(recordcount) if a record is
appended.

Keep a counter.
Or I can do a real count of the records, each time recordcount is
called.

No, too slow.

And what about recno? Just define it as -1, or do a quick count to get
the current record number?
Take a look at TCustomSqliteDataset implementation. In its implementation a count is done each time.
Store the recno with/in the linked list entry ?

It has two drawbacks: increase memory usage and when inserting, deleting all following records must be updated.

Luiz


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to