pub struct EntityMetadata {
pub rust_name: &'static str,
pub schema: &'static str,
pub table: &'static str,
pub renamed_from: Option<&'static str>,
pub columns: &'static [ColumnMetadata],
pub primary_key: PrimaryKeyMetadata,
pub indexes: &'static [IndexMetadata],
pub foreign_keys: &'static [ForeignKeyMetadata],
pub navigations: &'static [NavigationMetadata],
}Expand description
Static metadata describing an entity.
Fields§
§rust_name: &'static str§schema: &'static str§table: &'static str§renamed_from: Option<&'static str>§columns: &'static [ColumnMetadata]§primary_key: PrimaryKeyMetadata§indexes: &'static [IndexMetadata]§foreign_keys: &'static [ForeignKeyMetadata]Implementations§
Source§impl EntityMetadata
impl EntityMetadata
pub fn column(&self, column_name: &str) -> Option<&'static ColumnMetadata>
pub fn field(&self, rust_field: &str) -> Option<&'static ColumnMetadata>
pub fn primary_key_columns(&self) -> Vec<&'static ColumnMetadata>
pub fn rowversion_column(&self) -> Option<&'static ColumnMetadata>
pub fn foreign_key(&self, name: &str) -> Option<&'static ForeignKeyMetadata>
pub fn foreign_keys_for_column( &self, column_name: &str, ) -> Vec<&'static ForeignKeyMetadata>
pub fn foreign_keys_referencing( &self, schema: &str, table: &str, ) -> Vec<&'static ForeignKeyMetadata>
Trait Implementations§
Source§impl Clone for EntityMetadata
impl Clone for EntityMetadata
Source§fn clone(&self) -> EntityMetadata
fn clone(&self) -> EntityMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntityMetadata
impl Debug for EntityMetadata
Source§impl PartialEq for EntityMetadata
impl PartialEq for EntityMetadata
Source§fn eq(&self, other: &EntityMetadata) -> bool
fn eq(&self, other: &EntityMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for EntityMetadata
impl Eq for EntityMetadata
impl StructuralPartialEq for EntityMetadata
Auto Trait Implementations§
impl Freeze for EntityMetadata
impl RefUnwindSafe for EntityMetadata
impl Send for EntityMetadata
impl Sync for EntityMetadata
impl Unpin for EntityMetadata
impl UnsafeUnpin for EntityMetadata
impl UnwindSafe for EntityMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more