pub fn options<T: AstInfo>(options: &[SqlOption<T>]) -> BTreeMap<String, Value> {
    options
        .iter()
        .map(|o| match o {
            SqlOption::Value { name, value } => (ident(name.clone()), value.clone()),
            SqlOption::ObjectName { name, object_name } => (
                ident(name.clone()),
                Value::String(object_name.to_ast_string()),
            ),
            SqlOption::DataType { name, data_type } => (
                ident(name.clone()),
                Value::String(data_type.to_ast_string()),
            ),
        })
        .collect()
}
/// Normalizes a list of `WITH` options.
Normalizes a list of `WITH` options.
Normalizes a list of ` WITH ` options .
pub fn options<T: AstInfo>(options: &[SqlOption<T>]) -> BTreeMap<String, Value> {
    options
        .iter()
        .map(|o| match o {
            SqlOption::Value { name, value } => (ident(name.clone()), value.clone()),
            SqlOption::ObjectName { name, object_name } => (
                ident(name.clone()),
                Value::String(object_name.to_ast_string()),
            ),
            SqlOption::DataType { name, data_type } => (
                ident(name.clone()),
                Value::String(data_type.to_ast_string()),
            ),
        })
        .collect()
}
pub fn options < T : AstInfo > ( options : & [ SqlOption < T > ] ) -> BTreeMap < String , Value > { options . iter ( ) . map ( | o | match o { SqlOption :: Value { name , value } => ( ident ( name . clone ( ) ) , value . clone ( ) ) , SqlOption :: ObjectName { name , object_name } => ( ident ( name . clone ( ) ) , Value :: String ( object_name . to_ast_string ( ) ) , ) , SqlOption :: DataType { name , data_type } => ( ident ( name . clone ( ) ) , Value :: String ( data_type . to_ast_string ( ) ) , ) , } ) . collect ( ) }
Normalizes a list of `WITH` options.
Normalizes a list of ` WITH ` options .
options
&[SqlOption<T>]
options
&[SqlOption<T>]