Skip to content

Commit

Permalink
Merge pull request #933 from muzarski/decrease-pub-usage
Browse files Browse the repository at this point in the history
Decrease pub visibility of `scylla-cql` definitions
  • Loading branch information
Lorak-mmk authored Mar 28, 2024
2 parents a092845 + 73bbf87 commit 8155fd4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
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};

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::*;
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

0 comments on commit 8155fd4

Please sign in to comment.