diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c06c1c495..2d4a9e92d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 diff --git a/scylla/Cargo.toml b/scylla/Cargo.toml index 390a99501..6f4ba4907 100644 --- a/scylla/Cargo.toml +++ b/scylla/Cargo.toml @@ -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)', +] } diff --git a/scylla/src/lib.rs b/scylla/src/lib.rs index f03edf7a9..6724a65d9 100644 --- a/scylla/src/lib.rs +++ b/scylla/src/lib.rs @@ -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, diff --git a/scylla/src/transport/query_result.rs b/scylla/src/transport/query_result.rs index 114a433f2..b76ec28e5 100644 --- a/scylla/src/transport/query_result.rs +++ b/scylla/src/transport/query_result.rs @@ -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, Vec) { + 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`]