[][src]Module latitude::types

Types constructor module

Structs

Type

A database column type and all the metadata attached to it

WrapVec

A smol wrapper around Vec<T> to get around the orphan rules

Enums

BaseType

Core type enum, describing the basic type

WrappedDefault

Functions

array

Create an array of inner types

binary

Embed binary data

boolean

A boolean data type (true, false)

custom

Any custom SQL type that is embedded into a migration

date

An SQL date type

double

A 64-bit floating point type

float

A 32-bit floating point type

foreign

Create a column that points to some foreign table

foreign_schema

Like foreign(...) but letting you provide an external schema

index

Create an index over multiple, existing columns of the same type

integer

Create a basic integer type

json

A json-type column – not supported by all backends

primary

A standard primary numeric key type

text

A variable-length string type

uuid

A (standardised) UUID primary key type

varchar

A fixed-length string type