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

Decrease pub visibility of scylla-cql definitions #933

Merged
merged 4 commits into from
Mar 28, 2024
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
8 changes: 4 additions & 4 deletions scylla/benches/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use criterion::{criterion_group, criterion_main, Criterion};

use bytes::BytesMut;
use scylla::{
frame::types,
transport::partitioner::{calculate_token_for_partition_key, Murmur3Partitioner},
use scylla::transport::partitioner::{calculate_token_for_partition_key, Murmur3Partitioner};
use scylla_cql::{
frame::{response::result::ColumnType, types},
types::serialize::row::SerializedValues,
};
use scylla_cql::{frame::response::result::ColumnType, types::serialize::row::SerializedValues};
Lorak-mmk marked this conversation as resolved.
Show resolved Hide resolved

fn types_benchmark(c: &mut Criterion) {
let mut buf = BytesMut::with_capacity(64);
Expand Down
25 changes: 24 additions & 1 deletion scylla/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,30 @@ pub mod macros;
#[doc(inline)]
pub use macros::*;

pub use scylla_cql::frame;
pub mod frame {
pub use scylla_cql::frame::{frame_errors, value, Authenticator, Compression};
pub(crate) use scylla_cql::frame::{
parse_response_body_extensions, protocol_features, read_response_frame, request,
server_event_type, FrameParams, SerializedRequest,
};

pub mod types {
pub use scylla_cql::frame::types::{Consistency, SerialConsistency};
}

pub mod response {
pub use scylla_cql::frame::response::cql_to_rust;
pub(crate) use scylla_cql::frame::response::*;

pub mod result {
pub(crate) use scylla_cql::frame::response::result::*;
Comment on lines +118 to +121
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I'm happy with the glob imports here. Being pub(crate) ones, they are relatively benign though.

pub use scylla_cql::frame::response::result::{
ColumnSpec, ColumnType, CqlValue, PartitionKeyIndex, Row, TableSpec,
};
}
}
}

pub use scylla_cql::types::serialize;

pub mod authentication;
Expand Down
6 changes: 3 additions & 3 deletions scylla/tests/integration/lwt_optimisation.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::utils::{setup_tracing, test_with_3_node_cluster};

use scylla::frame::types;
use scylla::retry_policy::FallthroughRetryPolicy;
use scylla::test_utils::unique_keyspace_name;
use scylla::transport::session::Session;
use scylla::{frame::protocol_features::ProtocolFeatures, test_utils::unique_keyspace_name};
use scylla::{ExecutionProfile, SessionBuilder};
use scylla_cql::frame::protocol_features::ProtocolFeatures;
use scylla_cql::frame::types;
use std::sync::Arc;
use tokio::sync::mpsc;

Expand Down
Loading