gaia_access 0.1.1

Access the Gaia ESA Archive for astronomical data.
Documentation
// This code is generated by generate_code.py, do not modify it manually.

//! This module contains all the known columns in the columns table.

use crate::traits::{Column, Table};

/// TAP SCHEMA columns
#[allow(non_camel_case_types)]
pub struct columns;

impl Table for columns {
    fn string(&self) -> String {
        "columns".to_string()
    }
}

/// The columns in the columns table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// The arraysize column. (No further description available)
    arraysize,
    /// The column_index column. (No further description available)
    column_index,
    /// The column_name column. (No further description available)
    column_name,
    /// The datatype column. (No further description available)
    datatype,
    /// The db_column_name column. (No further description available)
    db_column_name,
    /// The description column. (No further description available)
    description,
    /// The indexed column. (No further description available)
    indexed,
    /// The principal column. (No further description available)
    principal,
    /// The schema_name column. (No further description available)
    schema_name,
    /// The "size" column. (No further description available)
    #[strum(serialize = "\"size\"")]
    size,
    /// The std column. (No further description available)
    std,
    /// The table_name column. (No further description available)
    table_name,
    /// The ucd column. (No further description available)
    ucd,
    /// The unit column. (No further description available)
    unit,
    /// The utype column. (No further description available)
    utype,
    /// The xtype column. (No further description available)
    xtype,
}

impl Column for Col {}

#[cfg(test)]
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
    let mut col_strings = Vec::new();
    col_strings.push(Col::arraysize.to_string());
    col_strings.push(Col::column_index.to_string());
    col_strings.push(Col::column_name.to_string());
    col_strings.push(Col::datatype.to_string());
    col_strings.push(Col::db_column_name.to_string());
    col_strings.push(Col::description.to_string());
    col_strings.push(Col::indexed.to_string());
    col_strings.push(Col::principal.to_string());
    col_strings.push(Col::schema_name.to_string());
    col_strings.push(Col::size.to_string());
    col_strings.push(Col::std.to_string());
    col_strings.push(Col::table_name.to_string());
    col_strings.push(Col::ucd.to_string());
    col_strings.push(Col::unit.to_string());
    col_strings.push(Col::utype.to_string());
    col_strings.push(Col::xtype.to_string());
    map.insert(columns.string(), col_strings);
}