pub enum SqlParameters
Text(String),
Values(Vec<String>),
Json(Value),
The query parameters of Kinetica::execute_with_parameters and Kinetica::query_with_parameters, sent as the query_parameters SQL option.
Variants
Parameters given as text, sent as they are.
Parameter values, sent as a JSON array.
Parameters of any JSON type – numbers, booleans, nulls, text, arrays and objects – sent as JSON text. So [1, 2.5, null] goes as [1,2.5,null], typed, where Self::Values would send text. Build it with serde_json::json!, or from a Vec<serde_json::Value>.
The server decides what it takes. Kinetica 7.2.3.21 binds numbers, text and nulls with their types (SELECT $1 of [1, null] is an int and a null), refuses a boolean (“Unexpected json value in query_parameters”), and takes nested arrays only for an INSERT.
Trait Implementations
impl Clone for SqlParameters
fn clone(&self) -> SqlParameters
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Debug for SqlParameters
impl Eq for SqlParameters
impl From<&[&str]> for SqlParameters
impl From<&str> for SqlParameters
impl From<String> for SqlParameters
impl From<Value> for SqlParameters
impl PartialEq for SqlParameters
fn eq(&self, other: &SqlParameters) -> bool
self and other values to be equal, and is used by ==.