Skip to content

Commit

Permalink
examples/value_list: query_unpaged -> query_single_page
Browse files Browse the repository at this point in the history
  • Loading branch information
muzarski committed Aug 28, 2024
1 parent 017d025 commit cb8c123
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/value_list.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::Result;
use scylla::{Session, SessionBuilder};
use scylla::{transport::PagingState, Session, SessionBuilder};
use std::env;

#[tokio::main]
Expand Down Expand Up @@ -56,11 +56,15 @@ async fn main() -> Result<()> {
)
.await?;

let q = session
.query_unpaged("SELECT * FROM examples_ks.my_type", &[])
let (query_result, _paging_state) = session
.query_single_page(
"SELECT * FROM examples_ks.my_type",
&[],
PagingState::start(),
)
.await?;

println!("Q: {:?}", q.rows);
println!("Q: {:?}", query_result.rows);

Ok(())
}

0 comments on commit cb8c123

Please sign in to comment.