[Lazarus] What is a TSQLTransaction and why do I need one?

Michael Van Canneyt michael at freepascal.org
Fri Nov 26 13:31:27 CET 2010



On Fri, 26 Nov 2010, Alexsander Rosa wrote:

> Don't get me wrong, I'm all for innovations in Free Pascal/Lazarus. However, in this particular case, I don't think the
> "multiple transactions per connection" approach, supported only by selected databases, is the best solution. IMHO it should
> be an option, not the only imposed way.
>

Agreed. That's why I also want to provide the 'easy access' option.

But by making it as it is, we made sure from the start that we support
the maximum options. If we had started with the DBExpress approach, 
the additional options would have been very unnatural and probably 
rather complicated.

> I've tried to use sqldb but it adds too much unneeded overhead. Under PostgreSQL it actually locks the tables for DDL
> modifications by default, rendering the development machines ridden with "IDLE in transaction" connections while the apps
> are running, even for mere SELECT's. In these machines, it's normal to add columns and constraints to tables while people
> are coding and testing. To create a simple FK constraint I would need to kill all connections or ask to everybody stop
> working -- otherwise the CREATE CONSTRAINT will wait several seconds/minutes while the SELECT's are being made. If someone
> is programming an yearly report that takes one minute to run, everybody has to wait.
> 
> That's why I moved to Zeos.

Well, that's the easy way, which doesn't help us.
(I understand the move, if you're in need of a quick solution, 
this is not a reproach.)

In the long term, however, it is better to try 
and convince us to make the model more open to other databases.

We will do so, but bugging us (or providing patches) is the best 
way of getting faster results.

Michael.




More information about the Lazarus mailing list