From 9f64050e995457fde9515abcfd765abc2da58356 Mon Sep 17 00:00:00 2001 From: Huw Wynn-Jones Date: Tue, 21 Aug 2018 22:47:11 +0100 Subject: [PATCH] Update files for v0.8.0 --- CHANGELOG.md | 4 ++++ CRATEREADME.md | 2 +- Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 2 +- src/statement.rs | 6 +++--- src/types.rs | 3 ++- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac9fc8..9fda582 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v0.8.0 + +Added support for setting the pre-fetch value and fixed a bug that caused bind parameters to be read from wrong memory addresses. + ## v0.7.0 Merges in support for windows via the `windows-gnu` toolchain along with some tidying up diff --git a/CRATEREADME.md b/CRATEREADME.md index 7f1da5a..fcac8b2 100755 --- a/CRATEREADME.md +++ b/CRATEREADME.md @@ -34,7 +34,7 @@ In order to use `oci_rs` add this to your `Cargo.toml`: ```toml [dependencies] -oci_rs = "0.7.0" +oci_rs = "0.8.0" ``` and this to your crate root: diff --git a/Cargo.toml b/Cargo.toml index 3f8b7b3..11c9820 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oci_rs" -version = "0.7.0" +version = "0.8.0" authors = ["Huw Wynn-Jones "] description = "This crate provides a Rust wrapper to the Oracle Call Interface (OCI) library." keywords = ["oracle", "database", "sql", "oci", "db"] diff --git a/README.md b/README.md index 7f1da5a..fcac8b2 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ In order to use `oci_rs` add this to your `Cargo.toml`: ```toml [dependencies] -oci_rs = "0.7.0" +oci_rs = "0.8.0" ``` and this to your crate root: diff --git a/src/lib.rs b/src/lib.rs index 3af0ff4..a106a30 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,7 +79,7 @@ //! //! ```toml //! [dependencies] -//! oci_rs = "0.7.0" +//! oci_rs = "0.8.0" //! ``` //! and this to your crate root: //! diff --git a/src/statement.rs b/src/statement.rs index 14d6a39..678ea7f 100755 --- a/src/statement.rs +++ b/src/statement.rs @@ -120,11 +120,11 @@ impl<'conn> Statement<'conn> { /// parameters, however this is not yet available through this crate. /// pub fn bind(&mut self, params: &[&ToSqlValue]) -> Result<(), OciError> { - // clear out previous bind parameters + // clear out previous bind parameters self.values.clear(); - + // ensure that the vec is large enough to hold all the parameters - // otherwise the vec will re-size, re-allocated and the addresses will change + // otherwise the vec will re-size, re-allocate and the addresses will change self.values.reserve(params.len()); for (index, param) in params.iter().enumerate() { diff --git a/src/types.rs b/src/types.rs index 87e4983..4594175 100755 --- a/src/types.rs +++ b/src/types.rs @@ -350,7 +350,8 @@ fn create_datetime_with_timezone_from_raw(data: &[u8]) -> DateTime let timezone_minute = convert_timezone_minute(data[12]); let hour_in_secs = timezone_hour * 3600; let minutes_in_secs = timezone_minute * 60; - let utc_dt = Utc.ymd(century + year, month, day) + let utc_dt = Utc + .ymd(century + year, month, day) .and_hms_nano(hour, minute, second, nano); utc_dt.with_timezone(&FixedOffset::east(hour_in_secs + minutes_in_secs)) }