use crate::sql::array::{array, Array}; use crate::sql::expression::{expression, Expression}; use crate::sql::idiom::{idiom, Idiom}; use crate::sql::param::{param, Param}; use crate::sql::script::{script, Script}; use crate::sql::value::{value, Value}; pub trait Parse { fn parse(val: &str) -> T; } impl Parse for Value { fn parse(val: &str) -> Value { value(val).unwrap().1 } } impl Parse for Array { fn parse(val: &str) -> Array { array(val).unwrap().1 } } impl Parse for Param { fn parse(val: &str) -> Param { param(val).unwrap().1 } } impl Parse for Idiom { fn parse(val: &str) -> Idiom { idiom(val).unwrap().1 } } impl Parse