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 28, 2024
1 parent d9a347c commit c1cfcdb
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 @@ -793,16 +793,6 @@ impl<'frame> DeserializedMetadataAndRawRows<'frame, RawRowsBorrowed<'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 @@ -1203,29 +1193,6 @@ impl RawMetadataAndRawRows {
|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_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 c1cfcdb

Please sign in to comment.