[Gambas-user] how to override Exec if already inherist from colection (conection pool emulation)

Christof Thalhofer chrisml at deganius.de
Fri Jul 6 18:34:14 CEST 2018


Am 06.07.2018 um 16:24 schrieb PICCORO McKAY Lenz:

> but i like your idea,

This is the way I organize all db connections in my different projects.
Is is very easy because when I do programming I can write

"Dbs."

and at that point all possible connections with descriptions pop up in
the IDE.

The second thing is, that a connection is always unique so that all
things that are executed within that connection are serialized.

The only thing you must be aware of is the following:

If you start a sql transaction in one part of your program with such a
connection and execute other db stuff in other parts of your program
with the same connection in parallel this also is inside this one sql
transaction.

If you do a rollback all stuff is gone.

This needs some discipline as a programmer. But this is always the case
with sql transactions ...


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180706/91b09d85/attachment.sig>


More information about the User mailing list