#[non_exhaustive]pub struct EntityMapping {
pub source_entity: String,
pub draft_entity: String,
pub source_type: DatabaseEntityType,
pub draft_type: DatabaseEntityType,
pub mapping_log: Vec<EntityMappingLogEntry>,
/* private fields */
}Expand description
Details of the mappings of a database entity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_entity: StringSource entity full name. The source entity can also be a column, index or constraint using the same naming notation schema.table.column.
draft_entity: StringTarget entity full name. The draft entity can also include a column, index or constraint using the same naming notation schema.table.column.
source_type: DatabaseEntityTypeType of source entity.
draft_type: DatabaseEntityTypeType of draft entity.
mapping_log: Vec<EntityMappingLogEntry>Entity mapping log entries. Multiple rules can be effective and contribute changes to a converted entity, such as a rule can handle the entity name, another rule can handle an entity type. In addition, rules which did not change the entity are also logged along with the reason preventing them to do so.
Implementations§
Source§impl EntityMapping
impl EntityMapping
pub fn new() -> Self
Sourcepub fn set_source_entity<T: Into<String>>(self, v: T) -> Self
pub fn set_source_entity<T: Into<String>>(self, v: T) -> Self
Sets the value of source_entity.
Sourcepub fn set_draft_entity<T: Into<String>>(self, v: T) -> Self
pub fn set_draft_entity<T: Into<String>>(self, v: T) -> Self
Sets the value of draft_entity.
Sourcepub fn set_source_type<T: Into<DatabaseEntityType>>(self, v: T) -> Self
pub fn set_source_type<T: Into<DatabaseEntityType>>(self, v: T) -> Self
Sets the value of source_type.
Sourcepub fn set_draft_type<T: Into<DatabaseEntityType>>(self, v: T) -> Self
pub fn set_draft_type<T: Into<DatabaseEntityType>>(self, v: T) -> Self
Sets the value of draft_type.
Sourcepub fn set_mapping_log<T, V>(self, v: T) -> Self
pub fn set_mapping_log<T, V>(self, v: T) -> Self
Sets the value of mapping_log.
Trait Implementations§
Source§impl Clone for EntityMapping
impl Clone for EntityMapping
Source§fn clone(&self) -> EntityMapping
fn clone(&self) -> EntityMapping
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more