pub struct ResultSet {
pub columns: Vec<Column>,
pub statistics: Statistics,
}
Expand description
Represents the return data from a graph. You shouldn’t have to use this type directly, but rather extract rows and columns via vectors of tuples and pattern matching/destructing
Fields§
§columns: Vec<Column>
The columns of this result set.
Empty if the response did not contain any return values.
statistics: Statistics
Contains statistics messages from the response.
Implementations§
Source§impl ResultSet
impl ResultSet
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Returns the number of rows in the result set.
Sourcepub fn get_scalar(
&self,
row_idx: usize,
column_idx: usize,
) -> GraphResult<&Scalar>
pub fn get_scalar( &self, row_idx: usize, column_idx: usize, ) -> GraphResult<&Scalar>
Returns the scalar at the given position.
Returns an error if the value at the given position is not a scalar or if the position is out of bounds.
Sourcepub fn get_node(&self, row_idx: usize, column_idx: usize) -> GraphResult<&Node>
pub fn get_node(&self, row_idx: usize, column_idx: usize) -> GraphResult<&Node>
Returns the node at the given position.
Returns an error if the value at the given position is not a node or if the position is out of bounds.
Sourcepub fn get_relation(
&self,
row_idx: usize,
column_idx: usize,
) -> GraphResult<&Relation>
pub fn get_relation( &self, row_idx: usize, column_idx: usize, ) -> GraphResult<&Relation>
Returns the relation at the given position.
Returns an error if the value at the given position is not a relation or if the position is out of bounds.