-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(README.md): update repository disclaimer to provide more informat…
…ion about the pre-release state and future plans feat(index.js): export Compression enum from native binding to allow usage in JavaScript code feat(cluster_config.rs): remove unused ClusterConfig struct feat(cluster_config/compression.rs): add Compression enum and conversion to scylla::transport::Compression feat(cluster_config/mod.rs): add compression field to ClusterConfig struct feat(scylla_cluster.rs): add compression field to ScyllaCluster struct and use it when creating ScyllaSession
- Loading branch information
Showing
8 changed files
with
56 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use napi::bindgen_prelude::*; | ||
|
||
#[napi] | ||
pub enum Compression { | ||
None, | ||
Lz4, | ||
Snappy, | ||
} | ||
|
||
impl From<Compression> for Option<scylla::transport::Compression> { | ||
fn from(value: Compression) -> Self { | ||
match value { | ||
Compression::None => None, | ||
Compression::Lz4 => Some(scylla::transport::Compression::Lz4), | ||
Compression::Snappy => Some(scylla::transport::Compression::Snappy), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use crate::cluster::{ | ||
cluster_config::compression::Compression, execution_profile::ExecutionProfile, | ||
}; | ||
|
||
pub mod compression; | ||
|
||
#[napi(object)] | ||
pub struct ClusterConfig { | ||
pub nodes: Vec<String>, | ||
pub compression: Option<Compression>, | ||
pub default_execution_profile: Option<ExecutionProfile>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters