Skip to main content

Module scalar

Module scalar 

Source

Re-exportsยง

pub use crate::relation_and_scalar::ProtoScalarType;
pub use crate::relation_and_scalar::proto_scalar_type::ProtoRecordField;

Macrosยง

impl_datum_type_copy ๐Ÿ”’
Macro to derive InputDatumType and OutputDatumType for all Datum variants that are simple Copy types
impl_tuple_input_datum_type ๐Ÿ”’

Structsยง

ArrayRustType
A new type that wraps a Vec that is used to differentiate the target Datum between Arrays and Lists. The target of this type is Array.
ExcludeNull
A wrapper type that excludes NULL values, even if B allows them.
Int2Vector
PostgreSQLโ€™s int2vector type: a thin wrapper over a 1-dimensional Array of int2, kept distinct from a regular int2[] array because it forbids NULL elements.
OptionalArg
Wrapper to distinguish โ€œargument may not be presentโ€ from Option<T> (nullable).
PropArray
PropDict
PropList
PropRange
Variadic
A wrapper type for variadic arguments that consumes the remaining iterator.

Enumsยง

Datum
A single value.
DatumKind
PropDatum
A mirror type for Datum that can be proptest-generated.
ReprScalarBaseType
ReprScalarType
The type of a Datum as it is represented.
SqlScalarBaseType
SqlScalarType
The type of a Datum.

Staticsยง

EMPTY_ARRAY_ROW ๐Ÿ”’
EMPTY_LIST_ROW ๐Ÿ”’
EMPTY_MAP_ROW ๐Ÿ”’

Traitsยง

AsColumnType
Types that implement this trait can be stored in an SQL column with the specified SqlColumnType
InputDatumType
A bridge between native Rust types and SQL runtime types represented in Datums
OutputDatumType
A bridge between native Rust types and SQL runtime types represented in Datums
SqlContainerType
Trait for SQL container types whose element/value type can be extracted from or wrapped into a SqlScalarType.

Functionsยง

add_arb_duration
arb_array ๐Ÿ”’
arb_array_dimension ๐Ÿ”’
arb_date ๐Ÿ”’
arb_datum
Generate an arbitrary PropDatum.
arb_datum_for_column
Generates an arbitrary PropDatum for the provided SqlColumnType.
arb_datum_for_scalar
Generates an arbitrary PropDatum for the provided SqlScalarType.
arb_dict ๐Ÿ”’
arb_list ๐Ÿ”’
arb_naive_date_time
Generates an arbitrary NaiveDateTime.
arb_numeric ๐Ÿ”’
arb_range ๐Ÿ”’
arb_range_data ๐Ÿ”’
arb_range_type
arb_record ๐Ÿ”’
arb_utc_date_time
Generates an arbitrary DateTime in Utc.
write_delimited ๐Ÿ”’