This commit is contained in:
Chris Tsang 2023-01-12 13:51:43 +08:00
parent 94bcc5ee7d
commit 0787035a42
2 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,8 @@ use crate::{
use futures::Stream; use futures::Stream;
use std::{future::Future, pin::Pin}; use std::{future::Future, pin::Pin};
/// Creates constraints for any structure that can create a database connection /// The generic API for a database connection that can perform query or execute statements.
/// and execute SQL statements /// It abstracts database connection and transaction
#[async_trait::async_trait] #[async_trait::async_trait]
pub trait ConnectionTrait: Sync { pub trait ConnectionTrait: Sync {
/// Fetch the database backend as specified in [DbBackend]. /// Fetch the database backend as specified in [DbBackend].

View File

@ -15,7 +15,7 @@ pub struct Statement {
pub db_backend: DbBackend, pub db_backend: DbBackend,
} }
/// Constraints for building a [Statement] /// Anything that can build a [Statement]
pub trait StatementBuilder { pub trait StatementBuilder {
/// Method to call in order to build a [Statement] /// Method to call in order to build a [Statement]
fn build(&self, db_backend: &DbBackend) -> Statement; fn build(&self, db_backend: &DbBackend) -> Statement;