Skip to content

Commit 5dcbe12

Browse files
committed
support mssql money types
1 parent 8b13464 commit 5dcbe12

File tree

4 files changed

+60
-67
lines changed

4 files changed

+60
-67
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG.md
22

3+
## unreleased
4+
- added support for the MONEY and SMALLMONEY types in MSSQL.
5+
36
## v0.35.2
47
- Fix a bug with zero values being displayed with a non-zero height in stacked bar charts.
58
- Updated dependencies, including the embedded SQLite database.

Cargo.lock

Lines changed: 53 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ panic = "abort"
2323
codegen-units = 2
2424

2525
[dependencies]
26-
sqlx = { package = "sqlx-oldapi", version = "0.6.43", default-features = false, features = [
26+
sqlx = { package = "sqlx-oldapi", version = "0.6.45", default-features = false, features = [
2727
"any",
2828
"runtime-tokio-rustls",
2929
"migrate",
@@ -64,7 +64,7 @@ actix-web-httpauth = "0.8.0"
6464
rand = "0.9.0"
6565
actix-multipart = "0.7.2"
6666
base64 = "0.22"
67-
rustls-acme = "0.13"
67+
rustls-acme = "0.14"
6868
dotenvy = "0.15.7"
6969
csv-async = { version = "1.2.6", features = ["tokio"] }
7070
rustls = { version = "0.23" } # keep in sync with actix-web, awc, rustls-acme, and sqlx

src/webserver/database/sql_to_json.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ pub fn sql_nonnull_to_json<'r>(mut get_ref: impl FnMut() -> sqlx::any::AnyValueR
5858
let type_name = type_info.name();
5959
log::trace!("Decoding a value of type {type_name:?} (type info: {type_info:?})");
6060
match type_name {
61-
"REAL" | "FLOAT" | "FLOAT4" | "FLOAT8" | "DOUBLE" | "NUMERIC" | "DECIMAL" => {
62-
decode_raw::<f64>(raw_value).into()
63-
}
61+
"REAL" | "FLOAT" | "FLOAT4" | "FLOAT8" | "DOUBLE" | "NUMERIC" | "DECIMAL" | "MONEY"
62+
| "SMALLMONEY" => decode_raw::<f64>(raw_value).into(),
6463
"INT8" | "BIGINT" | "SERIAL8" | "BIGSERIAL" | "IDENTITY" | "INT64" | "INTEGER8"
6564
| "BIGINT SIGNED" => decode_raw::<i64>(raw_value).into(),
6665
"INT" | "INT4" | "INTEGER" | "MEDIUMINT" | "YEAR" => decode_raw::<i32>(raw_value).into(),

0 commit comments

Comments
 (0)