From 69d5c701eed09cc65970113cdd8701f05975945e Mon Sep 17 00:00:00 2001 From: Charles Chege Date: Fri, 29 Oct 2021 10:37:54 +0300 Subject: [PATCH] Documetation for the schema module --- src/schema/entity.rs | 1 + src/schema/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/schema/entity.rs b/src/schema/entity.rs index a95b7047..51d5994e 100644 --- a/src/schema/entity.rs +++ b/src/schema/entity.rs @@ -5,6 +5,7 @@ use crate::{ use sea_query::{ColumnDef, ForeignKeyCreateStatement, Iden, Index, TableCreateStatement}; impl Schema { + /// Creates a table from an Entity. See [TableCreateStatement] for more details pub fn create_table_from_entity(entity: E) -> TableCreateStatement where E: EntityTrait, diff --git a/src/schema/mod.rs b/src/schema/mod.rs index 1d05e679..3a5ce734 100644 --- a/src/schema/mod.rs +++ b/src/schema/mod.rs @@ -1,4 +1,5 @@ mod entity; +/// This structure defines a schema for a table #[derive(Debug)] pub struct Schema;