diff --git a/src/database/statement.rs b/src/database/statement.rs index 77c4b4e7..82e38a42 100644 --- a/src/database/statement.rs +++ b/src/database/statement.rs @@ -15,7 +15,7 @@ pub struct Statement { pub db_backend: DbBackend, } -/// Anything that can build a [Statement] +/// Any type that can build a [Statement] pub trait StatementBuilder { /// Method to call in order to build a [Statement] fn build(&self, db_backend: &DbBackend) -> Statement; diff --git a/src/entity/active_model.rs b/src/entity/active_model.rs index 4b792912..1971a876 100644 --- a/src/entity/active_model.rs +++ b/src/entity/active_model.rs @@ -632,7 +632,7 @@ where } } -/// Constraints to perform the conversion of a type into an [ActiveValue] +/// Any type that can be converted into an [ActiveValue] pub trait IntoActiveValue where V: Into, diff --git a/src/entity/base_entity.rs b/src/entity/base_entity.rs index c3a13886..9438d462 100644 --- a/src/entity/base_entity.rs +++ b/src/entity/base_entity.rs @@ -37,7 +37,7 @@ pub trait EntityName: IdenStatic + Default { } } -/// An Entity implementing `EntityTrait` represents a table in a database. +/// An abstract base class for defining Entities. /// /// This trait provides an API for you to inspect it's properties /// - Column (implemented [`ColumnTrait`]) diff --git a/src/entity/column.rs b/src/entity/column.rs index a59d32fd..7421488a 100644 --- a/src/entity/column.rs +++ b/src/entity/column.rs @@ -174,7 +174,7 @@ macro_rules! bind_subquery_func { } // LINT: when the operand value does not match column type -/// Wrapper of the identically named method in [`sea_query::Expr`] +/// API for working with a `Column`. Mostly a wrapper of the identically named methods in [`sea_query::Expr`] pub trait ColumnTrait: IdenStatic + Iterable + FromStr { #[allow(missing_docs)] type EntityName: EntityName; diff --git a/src/entity/relation.rs b/src/entity/relation.rs index 715de400..74e49305 100644 --- a/src/entity/relation.rs +++ b/src/entity/relation.rs @@ -19,7 +19,7 @@ pub enum RelationType { /// to an ActiveModel pub type ForeignKeyAction = sea_query::ForeignKeyAction; -/// Constraints a type to implement the trait to create a relationship +/// Defines the relations of an Entity pub trait RelationTrait: Iterable + Debug + 'static { /// The method to call fn def(&self) -> RelationDef; diff --git a/src/query/helper.rs b/src/query/helper.rs index 759b671f..cea4a667 100644 --- a/src/query/helper.rs +++ b/src/query/helper.rs @@ -13,7 +13,7 @@ use sea_query::IntoColumnRef; // LINT: when the column does not appear in tables selected from // LINT: when there is a group by clause, but some columns don't have aggregate functions // LINT: when the join table or column does not exists -/// Constraints for any type that needs to perform select statements on a Model +/// Abstract API for performing queries pub trait QuerySelect: Sized { #[allow(missing_docs)] type QueryStatement;