From d25a3d8cb53d1e06f5d0c4428816f03fc29e8fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Fri, 11 Oct 2024 11:48:05 +0200 Subject: [PATCH] result: delete legacy Rows type It is no longer needed. For compatibility with LegacyQueryResult and LegacyRowIterator, higher-layer conversions suffice. --- scylla-cql/src/frame/response/result.rs | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/scylla-cql/src/frame/response/result.rs b/scylla-cql/src/frame/response/result.rs index 64d347919..63483d91f 100644 --- a/scylla-cql/src/frame/response/result.rs +++ b/scylla-cql/src/frame/response/result.rs @@ -709,16 +709,6 @@ impl<'frame> RawRowsWithDeserializedMetadata<'frame> { } } -#[derive(Debug)] -pub struct Rows { - pub metadata: ResultMetadataHolder<'static>, - pub paging_state_response: PagingStateResponse, - pub rows_count: usize, - pub rows: Vec, - /// Original size of the serialized rows. - pub serialized_size: usize, -} - #[derive(Debug)] pub enum Result { Void, @@ -1114,29 +1104,6 @@ impl RawRows { |cached| ResultMetadataHolder::SharedCached(Arc::clone(cached)), deser_col_specs_owned, ); - - pub fn into_legacy_rows( - self, - paging_state_response: PagingStateResponse, - ) -> StdResult { - let raw_rows_with_deserialized_metadata = self.deserialize_owned_metadata()?; - - let rows_size = raw_rows_with_deserialized_metadata.rows_size(); - let rows_count = raw_rows_with_deserialized_metadata.rows_count(); - let rows = raw_rows_with_deserialized_metadata - .rows_iter::()? - .collect::>()?; - - let metadata = raw_rows_with_deserialized_metadata.into_metadata(); - - Ok(Rows { - metadata, - paging_state_response, - rows_count, - rows, - serialized_size: rows_size, - }) - } } fn deser_prepared_metadata(