Skip to content

Commit

Permalink
result: delete legacy Rows type
Browse files Browse the repository at this point in the history
It is no longer needed. For compatibility with LegacyQueryResult and
LegacyRowIterator, higher-layer conversions suffice.
  • Loading branch information
wprzytula committed Nov 4, 2024
1 parent 1f598ca commit 2b1344e
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions scylla-cql/src/frame/response/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,16 +834,6 @@ impl DeserializedMetadataAndRawRows {
}
}

#[derive(Debug)]
pub struct Rows {
pub metadata: ResultMetadataHolder,
pub paging_state_response: PagingStateResponse,
pub rows_count: usize,
pub rows: Vec<Row>,
/// Original size of the serialized rows.
pub serialized_size: usize,
}

#[derive(Debug)]
pub enum Result {
Void,
Expand Down Expand Up @@ -1276,29 +1266,6 @@ impl RawMetadataAndRawRows {
raw_rows: frame_slice.to_bytes(),
})
}

pub fn into_legacy_rows(
self,
paging_state_response: PagingStateResponse,
) -> StdResult<Rows, RowsParseError> {
let raw_rows_with_deserialized_metadata = self.deserialize_metadata()?;

let rows_size = raw_rows_with_deserialized_metadata.rows_bytes_size();
let rows_count = raw_rows_with_deserialized_metadata.rows_count();
let rows = raw_rows_with_deserialized_metadata
.rows_iter::<Row>()?
.collect::<StdResult<_, _>>()?;

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(
Expand Down

0 comments on commit 2b1344e

Please sign in to comment.