Struct rustorm::table::RefTable [] [src]

pub struct RefTable<'a> {
    pub table: &'a Table,
    pub is_ext: bool,
    pub is_has_one: bool,
    pub is_has_many: bool,
    pub is_direct: bool,
    // some fields omitted
}

all referenced table used in context

Fields

table

the table being referred

is_ext
is_has_one
is_has_many
is_direct

Methods

impl<'a> RefTable<'a>

FIXME need more terse and ergonomic handling of conflicting member names

fn member_name(&self, used_in_table: &Table) -> String

return the appropriate member name of this reference when used with the table in context will have to use another name if the comed up name already in the column names 1. the concise name of the referred/referrring table 2. the name of the referred/referring table 3. the appended column_name and the table name 4. the table_name appended with HasMany, or HasOne 1:1, 1:M, M:M 11, 1m mm