Module sql_types

Source
Available on crate feature postgres_backend only.
Expand description

PostgreSQL specific SQL types

Note: All types in this module can be accessed through diesel::sql_types

Structs§

Array
The Array SQL type.
CChar
The "char" SQL type. This is a PostgreSQL specific type. Used for e.g. setweight. Do not use in user tables.
Cidr
The CIDR SQL type. This type can only be used with feature = "network-address" or feature = "ipnet-address".
Citext
The Citext SQL type. This is a PostgreSQL specific type.
Inet
The INET SQL type. This type can only be used with feature = "network-address" or feature = "ipnet-address".
MacAddr
The MACADDR SQL type.
MacAddr8
The MACADDR8 SQL type.
Money
The PostgreSQL Money type.
Multirange
The Multirange SQL type.
NullValueTreatmentEnum
This is a wrapper for NullValueTreatment to represent null_value_treatment for jsonb_seet_lax: ‘raise_exception’ ‘use_json_null’ ‘delete_key’ ‘return_target’ used in functions jsonb_set_lax
Oid
The OID SQL type. This is a PostgreSQL specific type.
PgLsn
The pg_lsn SQL type. This is a PostgreSQL specific type. Encodes a position in the PostgreSQL Write Ahead Log (WAL).
Range
The Range SQL type.
RangeBoundEnum
This is a wrapper for RangeBound to represent range bounds: ‘[]’, ‘(]’, ‘[)’, ‘()’, used in functions int4range, int8range, numrange, tsrange, tstzrange, daterange.
Record
The Record (a.k.a. tuple) SQL type.
Timestamptz
The “timestamp with time zone” SQL type, which PostgreSQL abbreviates to timestamptz.
Uuid
The UUID SQL type. This type can only be used with feature = "uuid"

Enums§

NullValueTreatment
Represent null_value_treatment for jsonb_seet_lax: ‘raise_exception’ ‘use_json_null’ ‘delete_key’ ‘return_target’ used in functions jsonb_seet_lax.
RangeBound
Represent postgres range bounds: ‘[]’, ‘(]’, ‘[)’, ‘()’, used in functions int4range, int8range, numrange, tsrange, tstzrange, daterange.

Type Aliases§

BigSerial
Alias for BigInt
Bytea
Alias for Binary, to ensure diesel print-schema works
Macaddr
Alias for MacAddr to be able to use it with diesel print-schema.
Macaddr8
Alias for MacAddr to be able to use it with diesel print-schema.
Serial
Alias for Integer
SmallSerial
Alias for SmallInt