Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions crates/primitives/src/postgres.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Support for the [`postgres_types`] crate.
//!
//! **WARNING**: this module depends entirely on [`postgres_types`, which is not yet stable,
//! **WARNING**: this module depends entirely on [`postgres_types`], which is not yet stable,
//! therefore this module is exempt from the semver guarantees of this crate.

use super::{FixedBytes, Sign, Signed};
Expand Down Expand Up @@ -188,22 +188,26 @@ impl<const BITS: usize, const LIMBS: usize> ToSql for Signed<BITS, LIMBS> {
}

fn accepts(ty: &Type) -> bool {
matches!(*ty, |Type::BOOL| Type::CHAR
| Type::INT2
| Type::INT4
| Type::INT8
| Type::OID
| Type::FLOAT4
| Type::FLOAT8
| Type::MONEY
| Type::NUMERIC
| Type::BYTEA
| Type::TEXT
| Type::VARCHAR
| Type::JSON
| Type::JSONB
| Type::BIT
| Type::VARBIT)
matches!(
*ty,
Type::BOOL
| Type::CHAR
| Type::INT2
| Type::INT4
| Type::INT8
| Type::OID
| Type::FLOAT4
| Type::FLOAT8
| Type::MONEY
| Type::NUMERIC
| Type::BYTEA
| Type::TEXT
| Type::VARCHAR
| Type::JSON
| Type::JSONB
| Type::BIT
| Type::VARBIT
)
}

to_sql_checked!();
Expand Down
Loading