[fpc-devel] Adding a unidirectional dataset to sqldb

Joost van der Sluis joost at cnoc.nl
Thu Oct 5 22:41:11 CEST 2006


On Thu, 2006-10-05 at 07:41 +0200, Martin Schreiber wrote:
> 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...).

I meant one that isn't inherited from TBufDataset, sorry for that
mistake.

> > 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.

Can you explain to me how I should construct this worker-class? As
Michael said, my solution won't work...

> 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...






More information about the fpc-devel mailing list