Skip to content

Commit

Permalink
add note
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Jan 4, 2025
1 parent 9a1138d commit e26bf3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sqlx-postgres/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
//!
//! # [Enumerations](https://www.postgresql.org/docs/current/datatype-enum.html)
//!
//! User-defined enumerations are supported through a derive for `Type`.
//! User-defined enumerations are supported through a `derive` for `Type`.
//!
//! ```text
//! CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');
Expand Down Expand Up @@ -187,6 +187,10 @@
//! #[sqlx(type_name = "text")]
//! enum Mood { Sad, Ok, Happy }
//! ```
//!
//! Note that an error can occur if you attempt to decode a value not contained within the enum
//! definition.
//!
use crate::type_info::PgTypeKind;
use crate::{PgTypeInfo, Postgres};
Expand Down

0 comments on commit e26bf3a

Please sign in to comment.