pub trait EntityName: IdenStatic + Default {
// Required method
fn table_name(&self) -> &'static str;
// Provided methods
fn schema_name(&self) -> Option<&str> { ... }
fn comment(&self) -> Option<&str> { ... }
fn table_ref(&self) -> TableRef { ... }
}Expand description
Names the SQL table backing an Entity, plus the optional
schema and comment metadata.
One of the building blocks of EntityTrait; usually generated via
#[derive(DeriveEntity)] or #[derive(DeriveEntityModel)].
Required Methods§
Sourcefn table_name(&self) -> &'static str
fn table_name(&self) -> &'static str
SQL name of the table.
Provided Methods§
Sourcefn schema_name(&self) -> Option<&str>
fn schema_name(&self) -> Option<&str>
Schema name this table lives in (PostgreSQL / SQL Server). Returns
None when the table lives in the connection’s default schema.
Sourcefn table_ref(&self) -> TableRef
fn table_ref(&self) -> TableRef
TableRef for this entity, qualified with schema_name
if one is set.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl EntityName for sea_orm::rbac::entity::permission::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::resource::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role_hierarchy::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role_permission::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::user_override::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::user_role::Entity
Available on crate feature
rbac only.