pub struct TableDef {
pub name: &'static str,
pub owner: &'static str,
pub columns: Vec<ColumnDef>,
pub uniques: Vec<UniqueDef>,
/* private fields */
}Fields§
§name: &'static str§owner: &'static str§columns: Vec<ColumnDef>§uniques: Vec<UniqueDef>Unique constraints over several columns. Single unique columns aren’t listed here.
Implementations§
Source§impl TableDef
impl TableDef
Sourcepub fn stored_reference(&self, position: usize) -> Option<&str>
pub fn stored_reference(&self, position: usize) -> Option<&str>
The stored name of the column the foreign key of the column at position points at.
Sourcepub fn stored_name(&self, position: usize) -> &str
pub fn stored_name(&self, position: usize) -> &str
The name the column at position is stored under: its declared name, unless
ColumnNaming or a rename changed it. Adapters use it in every statement.
Sourcepub fn stored_column(&self, column: &str) -> Option<&str>
pub fn stored_column(&self, column: &str) -> Option<&str>
The stored name of column, by its declared name.
Sourcepub fn column_stored_as(&self, stored: &str) -> Option<&ColumnDef>
pub fn column_stored_as(&self, stored: &str) -> Option<&ColumnDef>
The column stored under stored, the inverse of stored_name.
Sourcepub fn is_hex_text(&self, position: usize) -> bool
pub fn is_hex_text(&self, position: usize) -> bool
Whether the ColumnType::Bytes column at position is stored as lowercase hex
text instead of bytes, to share a text column another app owns
(Builder::bytes_as_hex_text).
Sourcepub fn bytes_text(&self, position: usize) -> Option<BytesText>
pub fn bytes_text(&self, position: usize) -> Option<BytesText>
How the ColumnType::Bytes column at position is stored as text, or None when
it’s stored as bytes.
Sourcepub fn id_storage(&self) -> IdStorage
pub fn id_storage(&self) -> IdStorage
How this table’s ColumnType::Id columns are stored; the same for every table
in a schema.