pub struct QueryResult<T> {
pub header: Vec<String>,
pub data: T,
pub stats: Vec<String>,
}Expand description
A response struct which also contains the returned header and stats data
Fields§
§header: Vec<String>Header for the result data, usually contains the scalar aliases for the columns
data: TThe actual data returned from the database
stats: Vec<String>Various statistics regarding the request, such as execution time and number of successful operations
Implementations§
Source§impl<T> QueryResult<T>
impl<T> QueryResult<T>
Sourcepub fn from_response(
headers: Option<Value>,
data: T,
stats: Value,
) -> FalkorResult<Self>
pub fn from_response( headers: Option<Value>, data: T, stats: Value, ) -> FalkorResult<Self>
Creates a QueryResult from the specified data, and raw stats, where raw headers are optional
§Arguments
headers: aredis::Valuethat is expected to be of variantredis::Value::Array, where each element is expected to be of variantredis::Value::BulkString,redis::Value::VerbatimStringorredis::Value::SimpleStringdata: The actual datastats: aredis::Valuethat is expected to be of variantredis::Value::Array, where each element is expected to be of variantredis::Value::BulkString,redis::Value::VerbatimStringorredis::Value::SimpleString
Sourcepub fn get_labels_added(&self) -> Option<i64>
pub fn get_labels_added(&self) -> Option<i64>
Returns the number of labels added in this query
Sourcepub fn get_labels_removed(&self) -> Option<i64>
pub fn get_labels_removed(&self) -> Option<i64>
Returns the number of labels removed in this query
Sourcepub fn get_nodes_created(&self) -> Option<i64>
pub fn get_nodes_created(&self) -> Option<i64>
Returns the number of nodes created in this query
Sourcepub fn get_nodes_deleted(&self) -> Option<i64>
pub fn get_nodes_deleted(&self) -> Option<i64>
Returns the number of nodes deleted in this query
Sourcepub fn get_properties_set(&self) -> Option<i64>
pub fn get_properties_set(&self) -> Option<i64>
Returns the number of properties set in this query
Sourcepub fn get_properties_removed(&self) -> Option<i64>
pub fn get_properties_removed(&self) -> Option<i64>
Returns the number of properties removed in this query
Sourcepub fn get_indices_created(&self) -> Option<i64>
pub fn get_indices_created(&self) -> Option<i64>
Returns the number of indices created in this query
Sourcepub fn get_indices_deleted(&self) -> Option<i64>
pub fn get_indices_deleted(&self) -> Option<i64>
Returns the number of indices deleted in this query
Sourcepub fn get_relationship_created(&self) -> Option<i64>
pub fn get_relationship_created(&self) -> Option<i64>
Returns the number of relationships created in this query
Sourcepub fn get_relationship_deleted(&self) -> Option<i64>
pub fn get_relationship_deleted(&self) -> Option<i64>
Returns the number of relationships deleted in this query
Sourcepub fn get_cached_execution(&self) -> Option<bool>
pub fn get_cached_execution(&self) -> Option<bool>
Returns whether this query was ran from cache
Sourcepub fn get_internal_execution_time(&self) -> Option<f64>
pub fn get_internal_execution_time(&self) -> Option<f64>
Returns the internal execution time of this query
Trait Implementations§
Source§impl<T: Clone> Clone for QueryResult<T>
impl<T: Clone> Clone for QueryResult<T>
Source§fn clone(&self) -> QueryResult<T>
fn clone(&self) -> QueryResult<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more