[fpc-devel] Adding a unidirectional dataset to sqldb

Martin Schreiber fpmse at bluewin.ch
Thu Oct 5 07:41:38 CEST 2006


On Thursday 05 October 2006 00.38, Joost van der Sluis wrote:
> Hi all,
>
> I have plans to add an unidirectional dataset/query to sqldb. Thus one
> that isn't inherited from TDataset. This to improve performance, for for
> example cgi-like programs, in which iterating back and forth through a
> database isn't necessary.
>
It should inherit from TDatset but not from TBufDataset IMHO to allow to use 
the existing DB components in Lazarus and MSEgui (persistent fields, data 
display widgets, field->parameter link, calculated fields...).

> But while working on this, I discovered that very much code from
> TSQLQuery could be exactly copied to this new class.
>
> Now I'm thinking about using an interface, to avoid double code. But I
> don't know what effect that has on run-time performance. I mean, the
> idea was to make if faster ...
>
A very good idea! It can then be implemented by a common worker class.
TSQLConnection and TSQLTransaction should be independent of TSQLQuery and 
TSQLQuery should get its own unit.
I use not reference counted (corba style) interfaces very often in 
MSEide+MSEgui and I am happy with them. I would even be more happy without 
Mantis 6036 and 6690...

Martin



More information about the fpc-devel mailing list