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
A wrapper around Array that represents a PostgreSQL int2vector value.
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

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 πŸ”’