Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rows_result: implement into_inner behind cpp_rust_unstable cfg #1133

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
run: cargo clippy --verbose --all-targets
- name: Clippy check with all features
run: cargo clippy --verbose --all-targets --all-features
- name: Cargo check with cpp_rust_unstable cfg
run: RUSTFLAGS="--cfg cpp_rust_unstable" cargo clippy --verbose --all-targets --all-features
- name: Cargo check without features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features ""
- name: Cargo check with all serialization features
Expand Down
6 changes: 5 additions & 1 deletion scylla/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,8 @@ harness = false
[lints.rust]
unnameable_types = "warn"
unreachable_pub = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(scylla_cloud_tests)', 'cfg(cassandra_tests)'] }
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(scylla_cloud_tests)',
'cfg(cassandra_tests)',
'cfg(cpp_rust_unstable)',
] }
3 changes: 3 additions & 0 deletions scylla/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ pub mod frame {
pub(crate) use scylla_cql::frame::response::*;

pub mod result {
#[cfg(cpp_rust_unstable)]
pub use scylla_cql::frame::response::result::DeserializedMetadataAndRawRows;

pub(crate) use scylla_cql::frame::response::result::*;
pub use scylla_cql::frame::response::result::{
ColumnSpec, ColumnType, CqlValue, PartitionKeyIndex, Row, TableSpec,
Expand Down
11 changes: 11 additions & 0 deletions scylla/src/transport/query_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,17 @@ impl QueryRowsResult {
Err(RowsError::TypeCheckFailed(err)) => Err(SingleRowError::TypeCheckFailed(err)),
}
}

#[cfg(cpp_rust_unstable)]
pub fn into_inner(self) -> (DeserializedMetadataAndRawRows, Option<Uuid>, Vec<String>) {
let Self {
raw_rows_with_metadata,
tracing_id,
warnings,
} = self;

(raw_rows_with_metadata, tracing_id, warnings)
}
}

/// An error returned by [`QueryResult::into_rows_result`]
Expand Down