columns
ModuleBuilders of each column class with its constructor's defaults.
Contents
Functions
booleanA `Boolean` column.datetimeA `DateTime` column (with the `datetime` filter).decimalUndocumented.default_sizeThe default size of a string class (`Text`: `LENGTH_KEY`, `Email`: 254, ...).enumerationAn `Enum` column.from_arrayOf column class `class`. `Email`, `IP` and `URL` inherit `Text::fromArray()`, which builds a `Text` (it calls `new self`), so they return `Text` columns.integerAn `Integer` (`big: false`) or `BigInt` column.relationshipA `Relationship` column.structuredA `Point`, `Line`, `Polygon` or `ObjectType` column.textA string column of class `class` (Text, Email, IP, URL, RegularText, MediumText, LongText, Varchar, Enum without elements).vectorA `Vector` column.use utopia_migration::resources::database::columns::boolean;Rust
pub fn boolean(key: &str, table: ResourceRef, required: bool, default: Option<bool>, array: bool) -> FieldA Boolean column.
use utopia_migration::resources::database::columns::datetime;Rust
pub fn datetime(key: &str, table: ResourceRef, required: bool, default: Option<String>, array: bool) -> FieldA DateTime column (with the datetime filter).
use utopia_migration::resources::database::columns::decimal;Rust
pub fn decimal(key: &str, table: ResourceRef, required: bool, default: Option<f64>, array: bool, min: Option<f64>, max: Option<f64>, signed: bool) -> FieldUndocumented.
use utopia_migration::resources::database::columns::default_size;Rust
pub fn default_size(class: FieldClass) -> i64The default size of a string class (Text: LENGTH_KEY, Email: 254, ...).
use utopia_migration::resources::database::columns::enumeration;Rust
pub fn enumeration(key: &str, table: ResourceRef, elements: Array, required: bool, default: Option<String>, array: bool, size: i64) -> FieldAn Enum column.
use utopia_migration::resources::database::columns::from_array;Rust
pub fn from_array(class: FieldClass, array: &Array) -> Result<ResourceRef>Of column class class. Email, IP
and URL inherit Text::fromArray(), which builds a Text (it calls
new self), so they return Text columns.
use utopia_migration::resources::database::columns::integer;Rust
pub fn integer(big: bool, key: &str, table: ResourceRef, required: bool, default: Option<i64>, array: bool, min: Option<i64>, max: Option<i64>, signed: bool) -> FieldAn Integer (big: false) or BigInt column.
use utopia_migration::resources::database::columns::relationship;Rust
pub fn relationship(key: &str, table: ResourceRef, related_table: &str, relation_type: &str, two_way: bool, two_way_key: Option<String>, on_delete: &str, side: &str) -> FieldA Relationship column.
use utopia_migration::resources::database::columns::structured;Rust
pub fn structured(class: FieldClass, key: &str, table: ResourceRef, required: bool, default: Option<Array>) -> FieldA Point, Line, Polygon or ObjectType column.
use utopia_migration::resources::database::columns::text;Rust
pub fn text(class: FieldClass, key: &str, table: ResourceRef, required: bool, default: Option<String>, array: bool, size: i64, format: &str) -> FieldA string column of class class (Text, Email, IP, URL, RegularText,
MediumText, LongText, Varchar, Enum without elements).
use utopia_migration::resources::database::columns::vector;Rust
pub fn vector(key: &str, table: ResourceRef, required: bool, size: i64, default: Option<Array>) -> FieldA Vector column.