pub struct Page {
pub columns: Vec<Column>,
pub rows: Vec<HashMap<String, Value>>,
pub ordered: bool,
pub order_keys: Vec<String>,
pub final_page: bool,
}Expand description
A page of query results.
Query results are returned in pages. Each page contains a slice of rows along with metadata about the result set.
§Example
ⓘ
let (page, _) = conn.query("MATCH (n:Person) RETURN n.name, n.age").await?;
for row in &page.rows {
let name = row.get("name").unwrap().as_string()?;
let age = row.get("age").unwrap().as_int()?;
println!("{}: {}", name, age);
}
if !page.final_page {
// More results available, would need to pull next page
}Fields§
§columns: Vec<Column>Column definitions for the result set
rows: Vec<HashMap<String, Value>>Result rows, each row is a map of column name to value
ordered: boolWhether results are ordered (ORDER BY was used)
order_keys: Vec<String>The keys used for ordering, if any
final_page: boolWhether this is the final page of results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request