Skip to main content

DEFAULT_FN

Constant DEFAULT_FN 

Source
pub const DEFAULT_FN: ColumnMarker;
Expand description

Generates a value in Rust for each insert that leaves the column unset.

The function takes no arguments and returns the field type.

ยงExamples

#[column(default_fn = Uuid::new_v4)]
id: Uuid,

Unlike DEFAULT, this does not add a database DEFAULT clause.