Hid sqlx behind feature flags

This commit is contained in:
Franklin 2023-05-10 12:56:37 -04:00
parent b30072bfe0
commit 4a3517ddeb
5 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,6 @@ bincode = "1.3.3"
rand = "0.8.5"
[features]
default = ["all"]
all = ["sqlx", "wasm"]
sqlx = ["dep:sqlx"]
wasm = ["uuid/js"]

View File

@ -1,5 +1,6 @@
use std::{fmt::Display, str::FromStr};
#[cfg(feature = "sqlx")]
use sqlx::{Postgres, postgres::{PgArgumentBuffer, PgValueRef, PgTypeInfo}, encode::IsNull, error::BoxDynError};
use crate::domain::error::FromStrError;

View File

@ -1,5 +1,6 @@
use std::{fmt::Display, str::FromStr};
#[cfg(feature = "sqlx")]
use sqlx::{Postgres, postgres::{PgArgumentBuffer, PgValueRef, PgTypeInfo}, encode::IsNull, error::BoxDynError};
use crate::domain::error::FromStrError;

View File

@ -1,5 +1,6 @@
use std::{fmt::Display, str::FromStr};
#[cfg(feature = "sqlx")]
use sqlx::{
encode::IsNull,
error::BoxDynError,

View File

@ -1,2 +1,3 @@
pub mod impls;
pub mod readable;