Skip to content

Commit a614118

Browse files
committed
Added postgres-only feature to make rorm-db easier
1 parent b8eb6a1 commit a614118

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ sqlite = [
4646
"dep:libsqlite3-sys",
4747
]
4848
mysql = []
49-
postgres = [
49+
postgres = []
50+
postgres-only = [
51+
"postgres",
5052
"dep:bit-vec",
5153
"dep:ipnetwork",
5254
"dep:mac_address",
53-
]
55+
]

src/value.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ pub enum NullType {
4848
/// serde_json's Value representation
4949
JsonValue,
5050
/// Mac address representation
51-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
51+
#[cfg(feature = "postgres-only")]
5252
MacAddress,
5353
/// IP network presentation
54-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
54+
#[cfg(feature = "postgres-only")]
5555
IpNetwork,
5656
/// Bit vec representation
57-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
57+
#[cfg(feature = "postgres-only")]
5858
BitVec,
5959
}
6060

@@ -120,12 +120,12 @@ pub enum Value<'a> {
120120
/// serde_json's Value representation
121121
JsonValue(&'a serde_json::Value),
122122
/// Mac address representation
123-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
123+
#[cfg(feature = "postgres-only")]
124124
MacAddress(mac_address::MacAddress),
125125
/// IP network presentation
126-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
126+
#[cfg(feature = "postgres-only")]
127127
IpNetwork(ipnetwork::IpNetwork),
128128
/// Bit vec representation
129-
#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
129+
#[cfg(feature = "postgres-only")]
130130
BitVec(&'a bit_vec::BitVec),
131131
}

0 commit comments

Comments
 (0)