diff --git a/src/database/connection.rs b/src/database/connection.rs index 389c84c8..d512c969 100644 --- a/src/database/connection.rs +++ b/src/database/connection.rs @@ -4,8 +4,8 @@ use crate::{ use futures::Stream; use std::{future::Future, pin::Pin}; -/// Creates constraints for any structure that can create a database connection -/// and execute SQL statements +/// The generic API for a database connection that can perform query or execute statements. +/// It abstracts database connection and transaction #[async_trait::async_trait] pub trait ConnectionTrait: Sync { /// Fetch the database backend as specified in [DbBackend]. diff --git a/src/database/statement.rs b/src/database/statement.rs index 94420c38..77c4b4e7 100644 --- a/src/database/statement.rs +++ b/src/database/statement.rs @@ -15,7 +15,7 @@ pub struct Statement { pub db_backend: DbBackend, } -/// Constraints for building a [Statement] +/// Anything that can build a [Statement] pub trait StatementBuilder { /// Method to call in order to build a [Statement] fn build(&self, db_backend: &DbBackend) -> Statement;