|
Hi All,
Is there an RDBMS driver in the Erlang universe whose API supports transactions? The docs for odbc, epgsql and emysql do not specify any kind of transaction support. Thanks in advance! _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
On 2 May 2011, at 20:24, Alex Arnon wrote:
Erlydb had transaction support, and some people may still be using it. ODBC actually does too. You use odbc:connect/2 followed by odbc:commit/2, unless you have {auto_commit, on}, in which case every query is a transaction. BR, Ulf W _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Alex Arnon
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 https://github.com/dizzyd/erlang-mysql-driver Look at the tests to see how transactions are used. I use them extensively in my current project. Alex Arnon <[hidden email]> writes: > Hi All, > > Is there an RDBMS driver in the Erlang universe whose API supports > transactions? > The docs for odbc, epgsql and emysql do not specify any kind of > transaction support. > > Thanks in advance! > > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions - -- Parnell "ixmatus" Springmeyer (http://ixmat.us) -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJNvvs7AAoJEPvtlbpI1POLvQcH/jyrjTekFE3P0FeF6dn84ROo mAQQWI0cKGM8gLJOJA0kzaf3kEOZ4Ad6qBot2cXU1W5jWBDxRdf0DcvlsGCXx7uN fNOfLCug6/3NNICkCjTUu+mtE1zs3itxj4LU87fbNe9h65MelASwQh7NnXob11A2 5ylQBXgzEdv6AaPavdO/ej9qRNDA0QieVTFaECW0Pzaly87q9XkBqkgQqoFt34Ta eAbewn90VhuQKB1GZZJDUOH58l57H2RaMKUqSqYMCCmqxwXXAmNUKyNYOsurx7za gCjSEBZ7JvCb+3yyLj6SWlHgTFypYNtZK+861lNLd8i2aKPsOuWHIo/9pkprO94= =PPX8 -----END PGP SIGNATURE----- _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Thank you all for the solutions, this is very helpful!
We will evaluate the epgsql and erlang-mysql solutions. On Mon, May 2, 2011 at 9:43 PM, Parnell Springmeyer <[hidden email]> wrote: -----BEGIN PGP SIGNED MESSAGE----- _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Just to reiterate Ulf's point, in case you missed it. The standard Erlang odbc module supports transactions when you odbc:connect/2 using the option {auto_commit, off}.
Although, if I remember correctly, nested txns are not supported. Robby On Mon, May 2, 2011 at 8:18 PM, Alex Arnon <[hidden email]> wrote:
_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Good - we don't need nested transactions.
Thanks! On Tue, May 3, 2011 at 11:11 AM, Robert Raschke <[hidden email]> wrote: Just to reiterate Ulf's point, in case you missed it. The standard Erlang odbc module supports transactions when you odbc:connect/2 using the option {auto_commit, off}. _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Alex Arnon
On Mon, May 2, 2011 at 10:24 PM, Alex Arnon <[hidden email]> wrote:
> Hi All, > > Is there an RDBMS driver in the Erlang universe whose API supports > transactions? > The docs for odbc, epgsql and emysql do not specify any kind of transaction > support. epgsql does have simple transaction support, take a look at function with_transaction/2 at https://github.com/wg/epgsql/blob/master/src/pgsql.erl Regards, Anton Lebedevich _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Oh, excellent! Thank you very much!
On Tue, May 3, 2011 at 3:39 PM, mabrek <[hidden email]> wrote:
_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
This post has NOT been accepted by the mailing list yet.
I know that the Odbc library has a commit/2 and commit/3, but I'm not sure if I am interpreting its use correctly.
If I create a session with the {auto_commit, off} attribute and then do a series of separate sql_query/2 SELECT statements (not batched statements, but separate invocations of sql_query/2), followed by a committ/2, are the selects all done within a single transaction guaranteeing ACID properties? I am using Oracle, by the way |
| Powered by Nabble | Edit this page |
