use crate::common::*;
mod column;
mod data_type;
mod table;
mod table_name;
pub(crate) use self::column::*;
pub(crate) use self::data_type::*;
pub(crate) use self::table::*;
pub(crate) use self::table_name::*;
pub(crate) fn if_exists_to_bq_load_arg(if_exists: &IfExists) -> Result<&'static str> {
match if_exists {
IfExists::Overwrite => Ok("--replace"),
IfExists::Append => Ok("--append_table"),
IfExists::Upsert(_) => Ok("--noreplace"),
IfExists::Error => Err(format_err!(
"BigQuery only supports --if-exists={{overwrite,append,upsert-on:X}}"
)),
}
}