Skip to content

Commit

Permalink
make sqlite datetime encoding compatible with CURRENT_TIMESTAMP
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Nov 20, 2024
1 parent f8ad381 commit 18c3d08
Show file tree
Hide file tree
Showing 12 changed files with 128 additions and 66 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.6.37

- Fix encoding of `DateTime<FixedOffset>` in SQLite. It used to be encoded as an RFC3339 string (with a 'T' between date and time),
which is inconsistent with the format used by CURRENT_TIMESTAMP in SQLite. This could easily result in nasty bugs where comparing datetimes generated by SQLite and datetimes generated from rust would return incorrect results.

## 0.6.36

- Fix decoding of MySQL `BIT` type as boolean
Expand Down
116 changes: 68 additions & 48 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [

[package]
name = "sqlx-oldapi"
version = "0.6.36"
version = "0.6.37"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/lovasoa/sqlx"
Expand Down Expand Up @@ -125,8 +125,8 @@ bstr = ["sqlx-core/bstr"]
git2 = ["sqlx-core/git2"]

[dependencies]
sqlx-core = { package = "sqlx-core-oldapi", version = "0.6.36", path = "sqlx-core", default-features = false }
sqlx-macros = { package = "sqlx-macros-oldapi", version = "0.6.36", path = "sqlx-macros", default-features = false, optional = true }
sqlx-core = { package = "sqlx-core-oldapi", version = "0.6.37", path = "sqlx-core", default-features = false }
sqlx-macros = { package = "sqlx-macros-oldapi", version = "0.6.37", path = "sqlx-macros", default-features = false, optional = true }

[dev-dependencies]
anyhow = "1.0.52"
Expand Down
2 changes: 1 addition & 1 deletion examples/postgres/axum-social-with-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
# Primary crates
axum = { version = "0.5.13", features = ["macros"] }
sqlx = { package = "sqlx-oldapi", version = "0.6.36", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] }
sqlx = { package = "sqlx-oldapi", version = "0.6.37", path = "../../../", features = ["runtime-tokio-rustls", "postgres", "time", "uuid"] }
tokio = { version = "1.20.1", features = ["rt-multi-thread", "macros"] }

# Important secondary crates
Expand Down
2 changes: 1 addition & 1 deletion sqlx-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqlx-cli"
version = "0.6.36"
version = "0.6.37"
description = "Command-line utility for SQLx, the Rust SQL toolkit."
edition = "2021"
readme = "README.md"
Expand Down
Loading

0 comments on commit 18c3d08

Please sign in to comment.