Skip to main content

VARCHAR

Constant VARCHAR 

Source
pub const VARCHAR: TypeMarker;
Expand description

Specifies a VARCHAR column type.

VARCHAR stores variable-length character strings. In PostgreSQL, VARCHAR without length limit is equivalent to TEXT. Use #[column(VARCHAR(255))] to preserve a bounded physical column while keeping the Rust field type as String; Vec<String> preserves the same bound for each array element.

See: https://www.postgresql.org/docs/current/datatype-character.html