Skip to content

Commit ed40fbf

Browse files
authored
Merge pull request diesel-rs#766 from ericho/missing_docs
Adding documentation to connection module.
2 parents 14bb720 + 7ec0552 commit ed40fbf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

diesel/src/connection/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ pub use self::transaction_manager::{TransactionManager, AnsiTransactionManager};
1111
#[doc(hidden)]
1212
pub use self::statement_cache::{StatementCache, StatementCacheKey, MaybeCached};
1313

14+
/// Perform simple operations on a backend.
1415
pub trait SimpleConnection {
15-
#[doc(hidden)]
16+
/// Execute multiple SQL statements within the same string.
17+
///
18+
/// This function is typically used in migrations where the statements to upgrade or
19+
/// downgrade the database are stored in SQL batch files.
1620
fn batch_execute(&self, query: &str) -> QueryResult<()>;
1721
}
1822

23+
/// Perform connections to a backend.
1924
pub trait Connection: SimpleConnection + Sized + Send {
25+
/// The backend this connection represents.
2026
type Backend: Backend;
2127
#[doc(hidden)]
2228
type TransactionManager: TransactionManager<Self>;

0 commit comments

Comments
 (0)