Skip to content

Commit 62f96b3

Browse files
authored
Merge pull request #1133 from muzarski/cpp-rust-decouple-query-rows-result
rows_result: implement into_inner behind `cpp_rust_unstable` cfg
2 parents 49c342e + ead6ef0 commit 62f96b3

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
run: cargo clippy --verbose --all-targets
4141
- name: Clippy check with all features
4242
run: cargo clippy --verbose --all-targets --all-features
43+
- name: Cargo check with cpp_rust_unstable cfg
44+
run: RUSTFLAGS="--cfg cpp_rust_unstable" cargo clippy --verbose --all-targets --all-features
4345
- name: Cargo check without features
4446
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features ""
4547
- name: Cargo check with all serialization features

scylla/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,8 @@ harness = false
9898
[lints.rust]
9999
unnameable_types = "warn"
100100
unreachable_pub = "warn"
101-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(scylla_cloud_tests)', 'cfg(cassandra_tests)'] }
101+
unexpected_cfgs = { level = "warn", check-cfg = [
102+
'cfg(scylla_cloud_tests)',
103+
'cfg(cassandra_tests)',
104+
'cfg(cpp_rust_unstable)',
105+
] }

scylla/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ pub mod frame {
118118
pub(crate) use scylla_cql::frame::response::*;
119119

120120
pub mod result {
121+
#[cfg(cpp_rust_unstable)]
122+
pub use scylla_cql::frame::response::result::DeserializedMetadataAndRawRows;
123+
121124
pub(crate) use scylla_cql::frame::response::result::*;
122125
pub use scylla_cql::frame::response::result::{
123126
ColumnSpec, ColumnType, CqlValue, PartitionKeyIndex, Row, TableSpec,

scylla/src/transport/query_result.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,17 @@ impl QueryRowsResult {
433433
Err(RowsError::TypeCheckFailed(err)) => Err(SingleRowError::TypeCheckFailed(err)),
434434
}
435435
}
436+
437+
#[cfg(cpp_rust_unstable)]
438+
pub fn into_inner(self) -> (DeserializedMetadataAndRawRows, Option<Uuid>, Vec<String>) {
439+
let Self {
440+
raw_rows_with_metadata,
441+
tracing_id,
442+
warnings,
443+
} = self;
444+
445+
(raw_rows_with_metadata, tracing_id, warnings)
446+
}
436447
}
437448

438449
/// An error returned by [`QueryResult::into_rows_result`]

0 commit comments

Comments
 (0)