@@ -486,9 +486,9 @@ impl GenericSession<CurrentDeserializationApi> {
486486 ///
487487 /// # Examples
488488 /// ```rust
489- /// # use scylla::LegacySession ;
489+ /// # use scylla::Session ;
490490 /// # use std::error::Error;
491- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
491+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
492492 /// // Insert an int and text into a table.
493493 /// session
494494 /// .query_unpaged(
@@ -500,24 +500,24 @@ impl GenericSession<CurrentDeserializationApi> {
500500 /// # }
501501 /// ```
502502 /// ```rust
503- /// # use scylla::LegacySession ;
503+ /// # use scylla::Session ;
504504 /// # use std::error::Error;
505- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
505+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
506506 /// use scylla::IntoTypedRows;
507507 ///
508508 /// // Read rows containing an int and text.
509509 /// // Keep in mind that all results come in one response (no paging is done!),
510510 /// // so the memory footprint and latency may be huge!
511511 /// // To prevent that, use `Session::query_iter` or `Session::query_single_page`.
512- /// let rows_opt = session
513- /// .query_unpaged("SELECT a, b FROM ks.tab", &[])
512+ /// let query_rows = session
513+ /// .query_unpaged("SELECT a, b FROM ks.tab", &[])
514514 /// .await?
515- /// .rows ;
515+ /// .into_rows_result()? ;
516516 ///
517- /// if let Some(rows) = rows_opt {
518- /// for row in rows.into_typed::<(i32, String)>() {
519- /// // Parse row as int and text \
520- /// let (int_val, text_val): (i32, String ) = row?;
517+ /// if let Some(rows) = query_rows {
518+ /// for row in rows.rows()? {
519+ /// // Parse row as int and text.
520+ /// let (int_val, text_val): (i32, &str ) = row?;
521521 /// }
522522 /// }
523523 /// # Ok(())
@@ -546,9 +546,9 @@ impl GenericSession<CurrentDeserializationApi> {
546546 /// # Example
547547 ///
548548 /// ```rust
549- /// # use scylla::LegacySession ;
549+ /// # use scylla::Session ;
550550 /// # use std::error::Error;
551- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
551+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
552552 /// use std::ops::ControlFlow;
553553 /// use scylla::statement::PagingState;
554554 ///
@@ -560,7 +560,11 @@ impl GenericSession<CurrentDeserializationApi> {
560560 /// .await?;
561561 ///
562562 /// // Do something with a single page of results.
563- /// for row in res.rows_typed::<(i32, String)>()? {
563+ /// for row in res
564+ /// .into_rows_result()?
565+ /// .unwrap()
566+ /// .rows::<(i32, &str)>()?
567+ /// {
564568 /// let (a, b) = row?;
565569 /// }
566570 ///
@@ -608,16 +612,16 @@ impl GenericSession<CurrentDeserializationApi> {
608612 /// # Example
609613 ///
610614 /// ```rust
611- /// # use scylla::LegacySession ;
615+ /// # use scylla::Session ;
612616 /// # use std::error::Error;
613- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
617+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
614618 /// use scylla::IntoTypedRows;
615619 /// use futures::stream::StreamExt;
616620 ///
617621 /// let mut rows_stream = session
618622 /// .query_iter("SELECT a, b FROM ks.t", &[])
619623 /// .await?
620- /// .into_typed ::<(i32, i32)>();
624+ /// .rows_stream ::<(i32, i32)>()? ;
621625 ///
622626 /// while let Some(next_row_res) = rows_stream.next().await {
623627 /// let (a, b): (i32, i32) = next_row_res?;
@@ -661,9 +665,9 @@ impl GenericSession<CurrentDeserializationApi> {
661665 ///
662666 /// # Example
663667 /// ```rust
664- /// # use scylla::LegacySession ;
668+ /// # use scylla::Session ;
665669 /// # use std::error::Error;
666- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
670+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
667671 /// use scylla::prepared_statement::PreparedStatement;
668672 ///
669673 /// // Prepare the query for later execution
@@ -697,9 +701,9 @@ impl GenericSession<CurrentDeserializationApi> {
697701 /// # Example
698702 ///
699703 /// ```rust
700- /// # use scylla::LegacySession ;
704+ /// # use scylla::Session ;
701705 /// # use std::error::Error;
702- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
706+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
703707 /// use std::ops::ControlFlow;
704708 /// use scylla::query::Query;
705709 /// use scylla::statement::{PagingState, PagingStateResponse};
@@ -719,7 +723,11 @@ impl GenericSession<CurrentDeserializationApi> {
719723 /// .await?;
720724 ///
721725 /// // Do something with a single page of results.
722- /// for row in res.rows_typed::<(i32, String)>()? {
726+ /// for row in res
727+ /// .into_rows_result()?
728+ /// .unwrap()
729+ /// .rows::<(i32, &str)>()?
730+ /// {
723731 /// let (a, b) = row?;
724732 /// }
725733 ///
@@ -763,12 +771,12 @@ impl GenericSession<CurrentDeserializationApi> {
763771 /// # Example
764772 ///
765773 /// ```rust
766- /// # use scylla::LegacySession;
774+ /// # use scylla::Session;
775+ /// # use futures::StreamExt as _;
767776 /// # use std::error::Error;
768- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
777+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
769778 /// use scylla::prepared_statement::PreparedStatement;
770779 /// use scylla::IntoTypedRows;
771- /// use futures::stream::StreamExt;
772780 ///
773781 /// // Prepare the query for later execution
774782 /// let prepared: PreparedStatement = session
@@ -779,7 +787,7 @@ impl GenericSession<CurrentDeserializationApi> {
779787 /// let mut rows_stream = session
780788 /// .execute_iter(prepared, &[])
781789 /// .await?
782- /// .into_typed ::<(i32, i32)>();
790+ /// .rows_stream ::<(i32, i32)>()? ;
783791 ///
784792 /// while let Some(next_row_res) = rows_stream.next().await {
785793 /// let (a, b): (i32, i32) = next_row_res?;
@@ -815,9 +823,9 @@ impl GenericSession<CurrentDeserializationApi> {
815823 ///
816824 /// # Example
817825 /// ```rust
818- /// # use scylla::LegacySession ;
826+ /// # use scylla::Session ;
819827 /// # use std::error::Error;
820- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
828+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
821829 /// use scylla::batch::Batch;
822830 ///
823831 /// let mut batch: Batch = Default::default();
@@ -944,13 +952,13 @@ where
944952 /// ```rust
945953 /// # use std::error::Error;
946954 /// # async fn check_only_compiles() -> Result<(), Box<dyn Error>> {
947- /// use scylla::{LegacySession , SessionConfig};
955+ /// use scylla::{Session , SessionConfig};
948956 /// use scylla::transport::KnownNode;
949957 ///
950958 /// let mut config = SessionConfig::new();
951959 /// config.known_nodes.push(KnownNode::Hostname("127.0.0.1:9042".to_string()));
952960 ///
953- /// let session: LegacySession = LegacySession ::connect(config).await?;
961+ /// let session: Session = Session ::connect(config).await?;
954962 /// # Ok(())
955963 /// # }
956964 /// ```
@@ -1282,9 +1290,9 @@ where
12821290 ///
12831291 /// # Example
12841292 /// ```rust
1285- /// # use scylla::LegacySession ;
1293+ /// # use scylla::Session ;
12861294 /// # use std::error::Error;
1287- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
1295+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
12881296 /// use scylla::prepared_statement::PreparedStatement;
12891297 ///
12901298 /// // Prepare the query for later execution
@@ -1611,9 +1619,9 @@ where
16111619 /// /// # Example
16121620 /// ```rust
16131621 /// # extern crate scylla;
1614- /// # use scylla::LegacySession ;
1622+ /// # use scylla::Session ;
16151623 /// # use std::error::Error;
1616- /// # async fn check_only_compiles(session: &LegacySession ) -> Result<(), Box<dyn Error>> {
1624+ /// # async fn check_only_compiles(session: &Session ) -> Result<(), Box<dyn Error>> {
16171625 /// use scylla::batch::Batch;
16181626 ///
16191627 /// // Create a batch statement with unprepared statements
@@ -1672,10 +1680,10 @@ where
16721680 /// * `case_sensitive` - if set to true the generated query will put keyspace name in quotes
16731681 /// # Example
16741682 /// ```rust
1675- /// # use scylla::{LegacySession , SessionBuilder};
1683+ /// # use scylla::{Session , SessionBuilder};
16761684 /// # use scylla::transport::Compression;
16771685 /// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
1678- /// # let session = SessionBuilder::new().known_node("127.0.0.1:9042").build_legacy ().await?;
1686+ /// # let session = SessionBuilder::new().known_node("127.0.0.1:9042").build ().await?;
16791687 /// session
16801688 /// .query_unpaged("INSERT INTO my_keyspace.tab (a) VALUES ('test1')", &[])
16811689 /// .await?;
0 commit comments