[m-users.] ODBC library: Ony one transaction per connection .. ?
Volker Wysk
post at volker-wysk.de
Mon Jan 17 20:00:47 AEDT 2022
Hi.
I've found this in the implementation part of odbc.m:
transaction(Source, User, Password, Closure, Result, !IO) :-
%
% We could have separate open and close connection predicates in the
% interface, but that would just be more effort for the programmer
% for a very minor efficiency gain. The connection time will be
% insignificant for even trivial queries.
%
This explains why there's only one transcation per connection, but it's
completely contrary to what I've heard. AFAIK opening a connection is an
expensive operation...
Confused, Volker
Am Montag, dem 17.01.2022 um 09:47 +0100 schrieb Volker Wysk:
> Hi!
>
> I've found this in odbc.m:
>
> % odbc.transaction(Source, UserName, Password, Transaction, Result).
> %
> % Open a connection to `Source' using the given `UserName'
> % and `Password', perform `Transaction' within a transaction
> % using that connection, then close the connection.
>
> And there aren't any predicates for opening and closing a connection...
>
> So you really need a new connection for every transaction ?? Is the ODBC
> library only meant as a tool, to demonstrate what's written in the research
> paper "Database transactions in a purely declarative logic programming
> language" ?
>
> Bye, Volker
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220117/23e58e04/attachment.sig>
More information about the users
mailing list