You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So trying to use OCITransactionManager when implementing TransactionManager for custom types (namely TransactionManager<diesel_logger::LoggingConnection<OciConnection>> for OciTranactionManager) is either very counter-intuitive, or impossible. So for an ordinary person like myself, impossible. This is in contrast to ANSITransaction in good old diesel, which can be used externally without any problems (see the diesel_logger crate). Thus I believe that this may be an unintentional "over-privatisation" of the OCITransaction type.
The error obtained was typically something like this:
error[E0603]: module `transaction` is private
--> diesel_logger/src/oracle.rs:18:37
|
18 | use diesel_oci::oracle::connection::transaction::OCITransactionManager;
| ^^^^^^^^^^^ private module
|
note: the module `transaction` is defined here
--> /root/.cargo/git/checkouts/diesel-oci-f6aa141946064a80/081d02f/src/oracle/connection/mod.rs:28:1
|
28 | mod transaction;
| ^^^^^^^^^^^^^^^^
And also applied when use diesel_oci::oracle::connection::OCITransactionManager; was done instead.
The revision it applied to was 081d02fa4012b5b594bbe8c83b7dc46e3ad70b45 although it was found in revisions up to and including ff4b8dc.
Changing mod transaction; to pub mod transaction; in "src/oracle/connection/mod.rs" (though maybe not the most elegant way), did allow the type to be used outside of diesel_oci, so I would suggest that something to this effect be done.
Alternatively, if there is some magical way of using OCITransactionManager that I have overlooked, and it is already a public type, I would like to recommend either simplifying its use or improving the documentation so developers don't have to sweat to hard trying to use it.
The text was updated successfully, but these errors were encountered:
So trying to use
OCITransactionManager
when implementingTransactionManager
for custom types (namelyTransactionManager<diesel_logger::LoggingConnection<OciConnection>> for OciTranactionManager
) is either very counter-intuitive, or impossible. So for an ordinary person like myself, impossible. This is in contrast toANSITransaction
in good olddiesel
, which can be used externally without any problems (see thediesel_logger
crate). Thus I believe that this may be an unintentional "over-privatisation" of theOCITransaction
type.The error obtained was typically something like this:
And also applied when
use diesel_oci::oracle::connection::OCITransactionManager;
was done instead.The revision it applied to was
081d02fa4012b5b594bbe8c83b7dc46e3ad70b45
although it was found in revisions up to and includingff4b8dc
.Changing
mod transaction;
topub mod transaction;
in "src/oracle/connection/mod.rs" (though maybe not the most elegant way), did allow the type to be used outside ofdiesel_oci
, so I would suggest that something to this effect be done.Alternatively, if there is some magical way of using
OCITransactionManager
that I have overlooked, and it is already a public type, I would like to recommend either simplifying its use or improving the documentation so developers don't have to sweat to hard trying to use it.The text was updated successfully, but these errors were encountered: