Struct gitql_core::schema::Schema
source · pub struct Schema {
pub tables_fields_names: HashMap<&'static str, Vec<&'static str>>,
pub tables_fields_types: HashMap<&'static str, DataType>,
}
Expand description
A Representation of the Data Schema that constructed the following
[tables_fields_names
] is a map of tables and columns names
§Examples
pub static ref TABLES_FIELDS_NAMES: HashMap<&'static str, Vec<&'static str>> = {
let mut map = HashMap::new();
map.insert("refs", vec!["name", "full_name", "type", "repo"]);
}
[tables_fields_types
] is a map of each column name in general with the expected data type
§Examples
pub static ref TABLES_FIELDS_TYPES: HashMap<&'static str, DataType> = {
let mut map = HashMap::new();
map.insert("commit_id", DataType::Text);
}
Fields§
§tables_fields_names: HashMap<&'static str, Vec<&'static str>>
§tables_fields_types: HashMap<&'static str, DataType>
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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