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

Release 0.15.1 #1150

Merged
merged 16 commits into from
Dec 11, 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
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ The above commands will leave a running ScyllaDB cluster in the background.
To stop it, use `make down`.\
Starting a cluster without running any test is possible with `make up`.

### Writing tests that need to connect to Scylla

If you test requires connecting to Scylla, there are a few things you should consider.

1. Such tests are considered integration tests and should be placed in `scylla/tests/integration`.
2. To avoid name conflicts while creating a keyspace use `unique_keyspace_name` function from `utils` module.
3. This `utils` module (`scylla/tests/integration/utils.rs`) contains other functions that may be helpful for writing tests.
For example `create_new_session_builder` or `test_with_3_node_cluster`.
4. To perform DDL queries (creating / altering / dropping a keyspace / table /type) use `ddl` method from the utils module.
To do this, import the `PerformDDL` trait (`use crate::utils::PerformDDL;`). Then you can call `ddl` method on a
`Session`.

### Tracing in tests

By default cargo captures `print!` macro's output from tests and prints them for failed tests.
Expand Down
80 changes: 50 additions & 30 deletions Cargo.lock.msrv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# -- Global variables

# Build documentation for the following tags and branches
TAGS = ['v0.14.0', 'v0.15.0']
TAGS = ['v0.14.0', 'v0.15.1']
BRANCHES = ['main']
# Set the latest version.
LATEST_VERSION = 'v0.15.0'
LATEST_VERSION = 'v0.15.1'
# Set which versions are not released yet.
UNSTABLE_VERSIONS = ['main']
# Set which versions are deprecated
Expand Down
4 changes: 2 additions & 2 deletions docs/source/data-types/date.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ while let Some((date_value,)) = iter.try_next().await? {

## chrono::NaiveDate

If full range is not required and `chrono` feature is enabled,
If full range is not required and `chrono-04` feature is enabled,
[`chrono::NaiveDate`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) can be used.
[`chrono::NaiveDate`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) supports dates from
-262145-01-01 to 262143-12-31.
Expand Down Expand Up @@ -78,7 +78,7 @@ while let Some((date_value,)) = iter.try_next().await? {

## time::Date

Alternatively, `time` feature can be used to enable support of
Alternatively, the `time-03` feature can be used to enable support of
[`time::Date`](https://docs.rs/time/0.3/time/struct.Date.html).
[`time::Date`](https://docs.rs/time/0.3/time/struct.Date.html)'s value range depends on feature flags, see its
documentation to get more info.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/data-types/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ while let Some((value,)) = iter.try_next().await? {

## chrono::NaiveTime

If `chrono` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html)
If the `chrono-04` feature is enabled, [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html)
can be used to interact with the database. Although chrono can represent leap seconds, they are not supported.
Attempts to convert [`chrono::NaiveTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDate.html) with leap
second to `CqlTime` or write it to the database will return an error.
Expand Down Expand Up @@ -78,7 +78,7 @@ while let Some((time_value,)) = iter.try_next().await? {

## time::Time

If `time` feature is enabled, [`time::Time`](https://docs.rs/time/0.3/time/struct.Time.html) can be used to interact
If the `time-03` feature is enabled, [`time::Time`](https://docs.rs/time/0.3/time/struct.Time.html) can be used to interact
with the database.

```rust
Expand Down
4 changes: 2 additions & 2 deletions docs/source/data-types/timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ while let Some((value,)) = iter.try_next().await? {

## chrono::DateTime

If full value range is not required, `chrono` feature can be used to enable support of
If the full value range is not required, the `chrono-04` feature can be used to enable support of
[`chrono::DateTime`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html). All values are expected to be converted
to UTC timezone explicitly, as [timestamp](https://docs.scylladb.com/stable/cql/types.html#timestamps) doesn't store
timezone information. Any precision finer than 1ms will be lost.
Expand Down Expand Up @@ -83,7 +83,7 @@ while let Some((timestamp_value,)) = iter.try_next().await? {

## time::OffsetDateTime

Alternatively, `time` feature can be used to enable support of
Alternatively, the `time-03` feature can be used to enable support of
[`time::OffsetDateTime`](https://docs.rs/time/0.3/time/struct.OffsetDateTime.html). As
[timestamp](https://docs.scylladb.com/stable/cql/types.html#timestamps) doesn't support timezone information, time will
be corrected to UTC and timezone info will be erased on write. On read, UTC timestamp is returned. Any precision finer
Expand Down
5 changes: 4 additions & 1 deletion examples/cqlsh-rs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ fn print_result(result: QueryResult) -> Result<(), IntoRowsResultError> {
}
Ok(())
}
Err(IntoRowsResultError::ResultNotRows(_)) => Ok(println!("OK")),
Err(IntoRowsResultError::ResultNotRows(_)) => {
println!("OK");
Ok(())
}
Err(e) => Err(e),
}
}
Expand Down
6 changes: 3 additions & 3 deletions scylla-cql/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scylla-cql"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
rust-version = "1.70"
description = "CQL data types and primitives, for interacting with Scylla."
Expand All @@ -11,14 +11,14 @@ categories = ["database"]
license = "MIT OR Apache-2.0"

[dependencies]
scylla-macros = { version = "0.7.0", path = "../scylla-macros" }
scylla-macros = { version = "0.7.1", path = "../scylla-macros" }
byteorder = "1.3.4"
bytes = "1.0.1"
tokio = { version = "1.34", features = ["io-util", "time"] }
secrecy-08 = { package = "secrecy", version = "0.8", optional = true }
snap = "1.0"
uuid = "1.0"
thiserror = "1.0"
thiserror = "2.0.6"
num-bigint-03 = { package = "num-bigint", version = "0.3", optional = true }
num-bigint-04 = { package = "num-bigint", version = "0.4", optional = true }
bigdecimal-04 = { package = "bigdecimal", version = "0.4", optional = true }
Expand Down
Loading
Loading