pub enum UserDefinedTypeRangeOption {
Subtype(DataType),
SubtypeOpClass(ObjectName),
Collation(ObjectName),
Canonical(ObjectName),
SubtypeDiff(ObjectName),
MultirangeTypeName(ObjectName),
}Expand description
Options for PostgreSQL CREATE TYPE ... AS RANGE statement.
Range types are data types representing a range of values of some element type (called the range’s subtype). These options configure the behavior of the range type.
§PostgreSQL Documentation
See: https://www.postgresql.org/docs/current/sql-createtype.html
§Examples
CREATE TYPE int4range AS RANGE (
SUBTYPE = int4,
SUBTYPE_OPCLASS = int4_ops,
CANONICAL = int4range_canonical,
SUBTYPE_DIFF = int4range_subdiff
);Variants§
Subtype(DataType)
The element type that the range type will represent: SUBTYPE = subtype
SubtypeOpClass(ObjectName)
The operator class for the subtype: SUBTYPE_OPCLASS = subtype_operator_class
Collation(ObjectName)
Collation to use for ordering the subtype: COLLATION = collation
Canonical(ObjectName)
Function to convert range values to canonical form: CANONICAL = canonical_function
SubtypeDiff(ObjectName)
Function to compute the difference between two subtype values: SUBTYPE_DIFF = subtype_diff_function
MultirangeTypeName(ObjectName)
Name of the corresponding multirange type: MULTIRANGE_TYPE_NAME = multirange_type_name
Trait Implementations§
Source§impl Clone for UserDefinedTypeRangeOption
impl Clone for UserDefinedTypeRangeOption
Source§fn clone(&self) -> UserDefinedTypeRangeOption
fn clone(&self) -> UserDefinedTypeRangeOption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserDefinedTypeRangeOption
impl Debug for UserDefinedTypeRangeOption
Source§impl Display for UserDefinedTypeRangeOption
impl Display for UserDefinedTypeRangeOption
Source§impl Hash for UserDefinedTypeRangeOption
impl Hash for UserDefinedTypeRangeOption
Source§impl Ord for UserDefinedTypeRangeOption
impl Ord for UserDefinedTypeRangeOption
Source§fn cmp(&self, other: &UserDefinedTypeRangeOption) -> Ordering
fn cmp(&self, other: &UserDefinedTypeRangeOption) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for UserDefinedTypeRangeOption
impl PartialOrd for UserDefinedTypeRangeOption
Source§impl Visit for UserDefinedTypeRangeOption
impl Visit for UserDefinedTypeRangeOption
Source§impl VisitMut for UserDefinedTypeRangeOption
impl VisitMut for UserDefinedTypeRangeOption
Source§fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
VisitorMut. Read moreimpl Eq for UserDefinedTypeRangeOption
impl StructuralPartialEq for UserDefinedTypeRangeOption
Auto Trait Implementations§
impl Freeze for UserDefinedTypeRangeOption
impl RefUnwindSafe for UserDefinedTypeRangeOption
impl Send for UserDefinedTypeRangeOption
impl Sync for UserDefinedTypeRangeOption
impl Unpin for UserDefinedTypeRangeOption
impl UnsafeUnpin for UserDefinedTypeRangeOption
impl UnwindSafe for UserDefinedTypeRangeOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more