As part of this it would be nice to log/test that the right statements are being executed by the database. But right now db connection will log a generic begin statement because the result from handle_begin is {:ok, result, state}.
Proposal
Allow handle_begin callbacks to return {:ok, query, result, state} in addition to {:ok, result, state} for drivers that can use customized begin queries. This would mirror the way handle_execute enables logging.
Problem Statement
I'm looking to add ddl transactions to SQLite. To prevent concurrent migrations I'm trying to use the exclusive transaction shown here: https://www.sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions
As part of this it would be nice to log/test that the right statements are being executed by the database. But right now db connection will log a generic
begin
statement because the result fromhandle_begin
is{:ok, result, state}
.Proposal
Allow
handle_begin
callbacks to return{:ok, query, result, state}
in addition to{:ok, result, state}
for drivers that can use customized begin queries. This would mirror the wayhandle_execute
enables logging.