1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use std::collections::HashMap;

use crate::types::DataType;

/// 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);
/// }
/// ```
///
pub struct Schema {
    pub tables_fields_names: HashMap<&'static str, Vec<&'static str>>,
    pub tables_fields_types: HashMap<&'static str, DataType>,
}