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 Oct 16, 2024
1 parent 009ced9 commit d25a3d8
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 @@ -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<Row>,
/// Original size of the serialized rows.
pub serialized_size: usize,
}

#[derive(Debug)]
pub enum Result {
Void,
Expand Down Expand Up @@ -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<Rows, RowsParseError> {
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::<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 d25a3d8

Please sign in to comment.