From a5ac41c58dbb328ad36243e4f57006a7bc4060b5 Mon Sep 17 00:00:00 2001
From: Huliiiiii <308013446a@gmail.com>
Date: Sat, 7 Mar 2026 16:09:21 +0800
Subject: [PATCH] Fix no-default-features compile errors in #2990 and #2991
---
Cargo.toml | 9 ++++++++-
src/driver/sqlx_postgres.rs | 6 +++++-
src/dynamic/model.rs | 3 +++
src/executor/query.rs | 9 +++++++++
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index c604ad9e14..4f76aa7b90 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,6 +51,7 @@ inventory = { version = "0.3", optional = true }
ipnetwork = { version = "0.20", default-features = false, optional = true }
itertools = "0.14.0"
log = { version = "0.4", default-features = false }
+mac_address = { version = "1.1", default-features = false, optional = true }
ouroboros = { version = "0.18", default-features = false }
pgvector = { version = "~0.4", default-features = false, optional = true }
rust_decimal = { version = "1", default-features = false, features = [
@@ -134,7 +135,7 @@ postgres-vector = [
"sea-query/postgres-vector",
"sea-query-sqlx?/postgres-vector",
]
-proxy = ["serde_json", "serde/derive"]
+proxy = ["serde/derive"]
rbac = ["sea-query/audit", "macros"]
runtime-async-std = ["sqlx?/runtime-async-std"]
runtime-async-std-native-tls = [
@@ -211,9 +212,15 @@ with-json = [
"bigdecimal?/serde",
"uuid?/serde",
"time?/serde",
+ "mac_address?/serde",
"pgvector?/serde",
"sea-query-sqlx?/with-json",
]
+with-mac_address = [
+ "mac_address",
+ "sea-query/with-mac_address",
+ "sea-query-sqlx?/with-mac_address",
+]
with-rust_decimal = [
"rust_decimal",
"sea-query/with-rust_decimal",
diff --git a/src/driver/sqlx_postgres.rs b/src/driver/sqlx_postgres.rs
index 9c602a630e..1c9f51cf4f 100644
--- a/src/driver/sqlx_postgres.rs
+++ b/src/driver/sqlx_postgres.rs
@@ -626,12 +626,16 @@ pub(crate) fn from_sqlx_postgres_row_to_proxy_row(row: &sqlx::postgres::PgRow) -
}),
),
+ #[cfg(feature = "with-json")]
"JSON" | "JSONB" => Value::Json(
row.try_get::