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

Update deps and crate version #26

Merged
merged 2 commits into from
Mar 15, 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: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: ["main"]

env:
RUST_TOOLCHAIN: 1.70.0
RUST_TOOLCHAIN: 1.74.0
EXASOL_VERSION: 7.0.22
NUM_NODES: 2
ETL_TEST_THREADS: 4
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [0.7.4] - 2024-03-15

### Added
- [#25](https://github.com/bobozaur/sqlx-exasol/pull/25): ETL module refactor based on `hyper`.
Expand Down
54 changes: 27 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-exasol"
version = "0.7.3"
version = "0.7.4"
edition = "2021"
authors = ["bobozaur"]
description = "Exasol driver for the SQLx framework."
Expand Down Expand Up @@ -39,53 +39,53 @@ etl_native_tls = ["dep:native-tls", "dep:rcgen", "etl"]

[dependencies]
rand = "0.8.5"
base64 = "0.21.2"
thiserror = "1.0.30"
url = "2.2.2"
rsa = "0.9.2"
async-tungstenite = "0.24.0"
futures-io = "0.3.28"
futures-util = "0.3.28"
futures-core = "0.3.28"
serde_json = { version = "1.0.100", features = ["raw_value"] }
serde = { version = "1.0.169", features = ["derive"] }
pin-project = "1.1.2"
lru = "0.12.0"
sqlx-core = "0.7.3"
sqlx-macros-core = "0.7.3"
tracing = { version = "0.1.37", features = ["log"] }
base64 = "0.22.0"
thiserror = "1.0.58"
url = "2.5.0"
rsa = "0.9.6"
async-tungstenite = "0.25.0"
futures-io = "0.3.30"
futures-util = "0.3.30"
futures-core = "0.3.30"
serde_json = { version = "1.0.114", features = ["raw_value"] }
serde = { version = "1.0.197", features = ["derive"] }
pin-project = "1.1.5"
lru = "0.12.3"
sqlx-core = "0.7.4"
sqlx-macros-core = "0.7.4"
tracing = { version = "0.1.40", features = ["log"] }
arrayvec = "0.7.4"
rcgen = { version = "0.12.0", optional = true }
rcgen = { version = "0.12.1", optional = true }
tungstenite = "0.21.0"

# Feature flagged optional dependencies
uuid = { version = "1.4.1", features = ["serde"], optional = true }
chrono = { version = "0.4.26", features = ["serde"], optional = true }
rust_decimal = { version = "1.30.0", optional = true }
uuid = { version = "1.7.0", features = ["serde"], optional = true }
chrono = { version = "0.4.35", features = ["serde"], optional = true }
rust_decimal = { version = "1.34.3", optional = true }
dotenvy = { version = "0.15.7", optional = true }
hex = { version = "0.4.3", optional = true }
flate2 = { version = "1.0.22", optional = true }
async-compression = { version = "0.4.1", features = [
flate2 = { version = "1.0.28", optional = true }
async-compression = { version = "0.4.6", features = [
"futures-io",
"gzip",
], optional = true }
rustls = { version = "0.21", default-features = false, features = [
"dangerous_configuration",
"tls12",
], optional = true }
native-tls = { version = "0.2.10", optional = true }
native-tls = { version = "0.2.11", optional = true }
hyper-util = { version = "0.1", features = ["full"], optional = true }
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1.1", features = ["server", "http1"], optional = true }
hyper = { version = "1.2.0", features = ["server", "http1"], optional = true }
bytes = { version = "1.5", optional = true }
futures-channel = { version = "0.3.30", optional = true }

[dev-dependencies]
sqlx = { version = "0.7.3", features = [
sqlx = { version = "0.7.4", features = [
"runtime-tokio",
"tls-native-tls",
"migrate",
] }
paste = "1.0.14"
anyhow = "1.0.72"
tokio = { version = "1.31.0", features = ["full"] }
anyhow = "1.0.81"
tokio = { version = "1.36.0", features = ["full"] }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
A database driver for Exasol to be used with the Rust [sqlx](https://github.com/launchbadge/sqlx) framework, based on the Exasol [Websocket API](https://github.com/exasol/websocket-api).
Inspired by [Py-Exasol](https://github.com/exasol/pyexasol) and based on the (now archived) [rust-exasol](https://github.com/bobozaur/rust-exasol) sync driver.

**MSRV**: `1.70`
**MSRV**: `1.74`

## Note
>The crate's version resembles the `sqlx` version it is based on so that managing dependencies is simpler.
>
> With that in mind, please favor using a fixed version of `sqlx` and `sqlx-exasol` in `Cargo.toml` to avoid issues, such as:
> ```toml
> sqlx = "=0.7.3"
> sqlx-exasol = "=0.7.3"
> sqlx = "=0.7.4"
> sqlx-exasol = "=0.7.4"
> ```


Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! A database driver for Exasol to be used with the Rust [sqlx](https://github.com/launchbadge/sqlx) framework.
//!
//! **MSRV**: `1.70`
//! **MSRV**: `1.74`
//!
//! ## Crate Features flags
//! * `etl` - enables the usage ETL jobs without TLS encryption.
Expand Down
10 changes: 5 additions & 5 deletions src/types/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ impl<'r> Decode<'r, Exasol> for chrono::Duration {
let millis: i64 = millis.parse().map_err(Box::new)?;
let sign = if days.is_negative() { -1 } else { 1 };

let duration = chrono::Duration::days(days)
+ chrono::Duration::hours(hours * sign)
+ chrono::Duration::minutes(minutes * sign)
+ chrono::Duration::seconds(seconds * sign)
+ chrono::Duration::milliseconds(millis * sign);
let duration = chrono::Duration::try_days(days).ok_or_else(input_err_fn)?
+ chrono::Duration::try_hours(hours * sign).ok_or_else(input_err_fn)?
+ chrono::Duration::try_minutes(minutes * sign).ok_or_else(input_err_fn)?
+ chrono::Duration::try_seconds(seconds * sign).ok_or_else(input_err_fn)?
+ chrono::Duration::try_milliseconds(millis * sign).ok_or_else(input_err_fn)?;

Ok(duration)
}
Expand Down
6 changes: 3 additions & 3 deletions tests/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ test_type_valid!(datetime_local_str<String>::"TIMESTAMP WITH LOCAL TIME ZONE"::(
test_type_valid!(datetime_local_option<Option<DateTime<Local>>>::"TIMESTAMP WITH LOCAL TIME ZONE"::("NULL" => None::<DateTime<Local>>, "''" => None::<DateTime<Local>>, "'2023-08-12 19:22:36.591000'" => Some(NaiveDateTime::parse_from_str("2023-08-12 19:22:36.591000", TIMESTAMP_FMT).unwrap().and_local_timezone(Local).unwrap())));
test_type_array!(datetime_local_array<DateTime<Local>>::"TIMESTAMP WITH LOCAL TIME ZONE"::(vec!["2023-08-12 19:22:36.591000", "2023-08-12 19:22:36.591000", "2023-08-12 19:22:36.591000"]));

test_type_valid!(duration<Duration>::"INTERVAL DAY TO SECOND"::("'10 20:45:50.123'" => Duration::milliseconds(938750123), "'-10 20:45:50.123'" => Duration::milliseconds(-938750123)));
test_type_valid!(duration<Duration>::"INTERVAL DAY TO SECOND"::("'10 20:45:50.123'" => Duration::try_milliseconds(938750123).unwrap(), "'-10 20:45:50.123'" => Duration::try_milliseconds(-938750123).unwrap()));
test_type_valid!(duration_str<String>::"INTERVAL DAY TO SECOND"::("'10 20:45:50.123'" => "+10 20:45:50.123"));
test_type_valid!(duration_with_prec<Duration>::"INTERVAL DAY(4) TO SECOND"::("'10 20:45:50.123'" => Duration::milliseconds(938750123), "'-10 20:45:50.123'" => Duration::milliseconds(-938750123)));
test_type_valid!(duration_option<Option<Duration>>::"INTERVAL DAY TO SECOND"::("NULL" => None::<Duration>, "''" => None::<Duration>, "'10 20:45:50.123'" => Some(Duration::milliseconds(938750123))));
test_type_valid!(duration_with_prec<Duration>::"INTERVAL DAY(4) TO SECOND"::("'10 20:45:50.123'" => Duration::try_milliseconds(938750123).unwrap(), "'-10 20:45:50.123'" => Duration::try_milliseconds(-938750123).unwrap()));
test_type_valid!(duration_option<Option<Duration>>::"INTERVAL DAY TO SECOND"::("NULL" => None::<Duration>, "''" => None::<Duration>, "'10 20:45:50.123'" => Some(Duration::try_milliseconds(938750123).unwrap())));
test_type_array!(duration_array<Duration>::"INTERVAL DAY TO SECOND"::(vec!["10 20:45:50.123", "10 20:45:50.123", "10 20:45:50.123"]));

test_type_valid!(months<Months>::"INTERVAL YEAR TO MONTH"::("'1-5'" => Months::new(17), "'-1-5'" => Months::new(-17)));
Expand Down
Loading