Struct yb_postgres::types::Type

pub struct Type(/* private fields */);
Expand description

A Postgres type.

Implementations§

§

impl Type

pub const BOOL: Type = _

BOOL - boolean, 'true'/'false'

pub const BYTEA: Type = _

BYTEA - variable-length string, binary values escaped

pub const CHAR: Type = _

CHAR - single character

pub const NAME: Type = _

NAME - 63-byte type for storing system identifiers

pub const INT8: Type = _

INT8 - ~18 digit integer, 8-byte storage

pub const INT2: Type = _

INT2 - -32 thousand to 32 thousand, 2-byte storage

pub const INT2_VECTOR: Type = _

INT2VECTOR - array of int2, used in system tables

pub const INT4: Type = _

INT4 - -2 billion to 2 billion integer, 4-byte storage

pub const REGPROC: Type = _

REGPROC - registered procedure

pub const TEXT: Type = _

TEXT - variable-length string, no limit specified

pub const OID: Type = _

OID - object identifier(oid), maximum 4 billion

pub const TID: Type = _

TID - (block, offset), physical location of tuple

pub const XID: Type = _

XID - transaction id

pub const CID: Type = _

CID - command identifier type, sequence in transaction id

pub const OID_VECTOR: Type = _

OIDVECTOR - array of oids, used in system tables

pub const PG_DDL_COMMAND: Type = _

PG_DDL_COMMAND - internal type for passing CollectedCommand

pub const JSON: Type = _

JSON - JSON stored as text

pub const XML: Type = _

XML - XML content

pub const XML_ARRAY: Type = _

XML[]

pub const PG_NODE_TREE: Type = _

PG_NODE_TREE - string representing an internal node tree

pub const JSON_ARRAY: Type = _

JSON[]

pub const TABLE_AM_HANDLER: Type = _

TABLE_AM_HANDLER

pub const XID8_ARRAY: Type = _

XID8[]

pub const INDEX_AM_HANDLER: Type = _

INDEX_AM_HANDLER - pseudo-type for the result of an index AM handler function

pub const POINT: Type = _

POINT - geometric point '(x, y)'

pub const LSEG: Type = _

LSEG - geometric line segment '(pt1,pt2)'

pub const PATH: Type = _

PATH - geometric path '(pt1,…)'

pub const BOX: Type = _

BOX - geometric box '(lower left,upper right)'

pub const POLYGON: Type = _

POLYGON - geometric polygon '(pt1,…)'

pub const LINE: Type = _

LINE - geometric line

pub const LINE_ARRAY: Type = _

LINE[]

pub const CIDR: Type = _

CIDR - network IP address/netmask, network address

pub const CIDR_ARRAY: Type = _

CIDR[]

pub const FLOAT4: Type = _

FLOAT4 - single-precision floating point number, 4-byte storage

pub const FLOAT8: Type = _

FLOAT8 - double-precision floating point number, 8-byte storage

pub const UNKNOWN: Type = _

UNKNOWN - pseudo-type representing an undetermined type

pub const CIRCLE: Type = _

CIRCLE - geometric circle '(center,radius)'

pub const CIRCLE_ARRAY: Type = _

CIRCLE[]

pub const MACADDR8: Type = _

MACADDR8 - XX:XX:XX:XX:XX:XX:XX:XX, MAC address

pub const MACADDR8_ARRAY: Type = _

MACADDR8[]

pub const MONEY: Type = _

MONEY - monetary amounts, $d,ddd.cc

pub const MONEY_ARRAY: Type = _

MONEY[]

pub const MACADDR: Type = _

MACADDR - XX:XX:XX:XX:XX:XX, MAC address

pub const INET: Type = _

INET - IP address/netmask, host address, netmask optional

pub const BOOL_ARRAY: Type = _

BOOL[]

pub const BYTEA_ARRAY: Type = _

BYTEA[]

pub const CHAR_ARRAY: Type = _

CHAR[]

pub const NAME_ARRAY: Type = _

NAME[]

pub const INT2_ARRAY: Type = _

INT2[]

pub const INT2_VECTOR_ARRAY: Type = _

INT2VECTOR[]

pub const INT4_ARRAY: Type = _

INT4[]

pub const REGPROC_ARRAY: Type = _

REGPROC[]

pub const TEXT_ARRAY: Type = _

TEXT[]

pub const TID_ARRAY: Type = _

TID[]

pub const XID_ARRAY: Type = _

XID[]

pub const CID_ARRAY: Type = _

CID[]

pub const OID_VECTOR_ARRAY: Type = _

OIDVECTOR[]

pub const BPCHAR_ARRAY: Type = _

BPCHAR[]

pub const VARCHAR_ARRAY: Type = _

VARCHAR[]

pub const INT8_ARRAY: Type = _

INT8[]

pub const POINT_ARRAY: Type = _

POINT[]

pub const LSEG_ARRAY: Type = _

LSEG[]

pub const PATH_ARRAY: Type = _

PATH[]

pub const BOX_ARRAY: Type = _

BOX[]

pub const FLOAT4_ARRAY: Type = _

FLOAT4[]

pub const FLOAT8_ARRAY: Type = _

FLOAT8[]

pub const POLYGON_ARRAY: Type = _

POLYGON[]

pub const OID_ARRAY: Type = _

OID[]

pub const ACLITEM: Type = _

ACLITEM - access control list

pub const ACLITEM_ARRAY: Type = _

ACLITEM[]

pub const MACADDR_ARRAY: Type = _

MACADDR[]

pub const INET_ARRAY: Type = _

INET[]

pub const BPCHAR: Type = _

BPCHAR - char(length), blank-padded string, fixed storage length

pub const VARCHAR: Type = _

VARCHAR - varchar(length), non-blank-padded string, variable storage length

pub const DATE: Type = _

DATE - date

pub const TIME: Type = _

TIME - time of day

pub const TIMESTAMP: Type = _

TIMESTAMP - date and time

pub const TIMESTAMP_ARRAY: Type = _

TIMESTAMP[]

pub const DATE_ARRAY: Type = _

DATE[]

pub const TIME_ARRAY: Type = _

TIME[]

pub const TIMESTAMPTZ: Type = _

TIMESTAMPTZ - date and time with time zone

pub const TIMESTAMPTZ_ARRAY: Type = _

TIMESTAMPTZ[]

pub const INTERVAL: Type = _

INTERVAL - @ <number> <units>, time interval

pub const INTERVAL_ARRAY: Type = _

INTERVAL[]

pub const NUMERIC_ARRAY: Type = _

NUMERIC[]

pub const CSTRING_ARRAY: Type = _

CSTRING[]

pub const TIMETZ: Type = _

TIMETZ - time of day with time zone

pub const TIMETZ_ARRAY: Type = _

TIMETZ[]

pub const BIT: Type = _

BIT - fixed-length bit string

pub const BIT_ARRAY: Type = _

BIT[]

pub const VARBIT: Type = _

VARBIT - variable-length bit string

pub const VARBIT_ARRAY: Type = _

VARBIT[]

pub const NUMERIC: Type = _

NUMERIC - numeric(precision, decimal), arbitrary precision number

pub const REFCURSOR: Type = _

REFCURSOR - reference to cursor (portal name)

pub const REFCURSOR_ARRAY: Type = _

REFCURSOR[]

pub const REGPROCEDURE: Type = _

REGPROCEDURE - registered procedure (with args)

pub const REGOPER: Type = _

REGOPER - registered operator

pub const REGOPERATOR: Type = _

REGOPERATOR - registered operator (with args)

pub const REGCLASS: Type = _

REGCLASS - registered class

pub const REGTYPE: Type = _

REGTYPE - registered type

pub const REGPROCEDURE_ARRAY: Type = _

REGPROCEDURE[]

pub const REGOPER_ARRAY: Type = _

REGOPER[]

pub const REGOPERATOR_ARRAY: Type = _

REGOPERATOR[]

pub const REGCLASS_ARRAY: Type = _

REGCLASS[]

pub const REGTYPE_ARRAY: Type = _

REGTYPE[]

pub const RECORD: Type = _

RECORD - pseudo-type representing any composite type

pub const CSTRING: Type = _

CSTRING - C-style string

pub const ANY: Type = _

ANY - pseudo-type representing any type

pub const ANYARRAY: Type = _

ANYARRAY - pseudo-type representing a polymorphic array type

pub const VOID: Type = _

VOID - pseudo-type for the result of a function with no real result

pub const TRIGGER: Type = _

TRIGGER - pseudo-type for the result of a trigger function

pub const LANGUAGE_HANDLER: Type = _

LANGUAGE_HANDLER - pseudo-type for the result of a language handler function

pub const INTERNAL: Type = _

INTERNAL - pseudo-type representing an internal data structure

pub const ANYELEMENT: Type = _

ANYELEMENT - pseudo-type representing a polymorphic base type

pub const RECORD_ARRAY: Type = _

RECORD[]

pub const ANYNONARRAY: Type = _

ANYNONARRAY - pseudo-type representing a polymorphic base type that is not an array

pub const TXID_SNAPSHOT_ARRAY: Type = _

TXID_SNAPSHOT[]

pub const UUID: Type = _

UUID - UUID datatype

pub const UUID_ARRAY: Type = _

UUID[]

pub const TXID_SNAPSHOT: Type = _

TXID_SNAPSHOT - txid snapshot

pub const FDW_HANDLER: Type = _

FDW_HANDLER - pseudo-type for the result of an FDW handler function

pub const PG_LSN: Type = _

PG_LSN - PostgreSQL LSN datatype

pub const PG_LSN_ARRAY: Type = _

PG_LSN[]

pub const TSM_HANDLER: Type = _

TSM_HANDLER - pseudo-type for the result of a tablesample method function

pub const PG_NDISTINCT: Type = _

PG_NDISTINCT - multivariate ndistinct coefficients

pub const PG_DEPENDENCIES: Type = _

PG_DEPENDENCIES - multivariate dependencies

pub const ANYENUM: Type = _

ANYENUM - pseudo-type representing a polymorphic base type that is an enum

pub const TS_VECTOR: Type = _

TSVECTOR - text representation for text search

pub const TSQUERY: Type = _

TSQUERY - query representation for text search

pub const GTS_VECTOR: Type = _

GTSVECTOR - GiST index internal text representation for text search

pub const TS_VECTOR_ARRAY: Type = _

TSVECTOR[]

pub const GTS_VECTOR_ARRAY: Type = _

GTSVECTOR[]

pub const TSQUERY_ARRAY: Type = _

TSQUERY[]

pub const REGCONFIG: Type = _

REGCONFIG - registered text search configuration

pub const REGCONFIG_ARRAY: Type = _

REGCONFIG[]

pub const REGDICTIONARY: Type = _

REGDICTIONARY - registered text search dictionary

pub const REGDICTIONARY_ARRAY: Type = _

REGDICTIONARY[]

pub const JSONB: Type = _

JSONB - Binary JSON

pub const JSONB_ARRAY: Type = _

JSONB[]

pub const ANY_RANGE: Type = _

ANYRANGE - pseudo-type representing a range over a polymorphic base type

pub const EVENT_TRIGGER: Type = _

EVENT_TRIGGER - pseudo-type for the result of an event trigger function

pub const INT4_RANGE: Type = _

INT4RANGE - range of integers

pub const INT4_RANGE_ARRAY: Type = _

INT4RANGE[]

pub const NUM_RANGE: Type = _

NUMRANGE - range of numerics

pub const NUM_RANGE_ARRAY: Type = _

NUMRANGE[]

pub const TS_RANGE: Type = _

TSRANGE - range of timestamps without time zone

pub const TS_RANGE_ARRAY: Type = _

TSRANGE[]

pub const TSTZ_RANGE: Type = _

TSTZRANGE - range of timestamps with time zone

pub const TSTZ_RANGE_ARRAY: Type = _

TSTZRANGE[]

pub const DATE_RANGE: Type = _

DATERANGE - range of dates

pub const DATE_RANGE_ARRAY: Type = _

DATERANGE[]

pub const INT8_RANGE: Type = _

INT8RANGE - range of bigints

pub const INT8_RANGE_ARRAY: Type = _

INT8RANGE[]

pub const JSONPATH: Type = _

JSONPATH - JSON path

pub const JSONPATH_ARRAY: Type = _

JSONPATH[]

pub const REGNAMESPACE: Type = _

REGNAMESPACE - registered namespace

pub const REGNAMESPACE_ARRAY: Type = _

REGNAMESPACE[]

pub const REGROLE: Type = _

REGROLE - registered role

pub const REGROLE_ARRAY: Type = _

REGROLE[]

pub const REGCOLLATION: Type = _

REGCOLLATION - registered collation

pub const REGCOLLATION_ARRAY: Type = _

REGCOLLATION[]

pub const INT4MULTI_RANGE: Type = _

INT4MULTIRANGE - multirange of integers

pub const NUMMULTI_RANGE: Type = _

NUMMULTIRANGE - multirange of numerics

pub const TSMULTI_RANGE: Type = _

TSMULTIRANGE - multirange of timestamps without time zone

pub const TSTZMULTI_RANGE: Type = _

TSTZMULTIRANGE - multirange of timestamps with time zone

pub const DATEMULTI_RANGE: Type = _

DATEMULTIRANGE - multirange of dates

pub const INT8MULTI_RANGE: Type = _

INT8MULTIRANGE - multirange of bigints

pub const ANYMULTI_RANGE: Type = _

ANYMULTIRANGE - pseudo-type representing a polymorphic base type that is a multirange

pub const ANYCOMPATIBLEMULTI_RANGE: Type = _

ANYCOMPATIBLEMULTIRANGE - pseudo-type representing a multirange over a polymorphic common type

pub const PG_BRIN_BLOOM_SUMMARY: Type = _

PG_BRIN_BLOOM_SUMMARY - BRIN bloom summary

pub const PG_BRIN_MINMAX_MULTI_SUMMARY: Type = _

PG_BRIN_MINMAX_MULTI_SUMMARY - BRIN minmax-multi summary

pub const PG_MCV_LIST: Type = _

PG_MCV_LIST - multivariate MCV list

pub const PG_SNAPSHOT: Type = _

PG_SNAPSHOT - snapshot

pub const PG_SNAPSHOT_ARRAY: Type = _

PG_SNAPSHOT[]

pub const XID8: Type = _

XID8 - full transaction id

pub const ANYCOMPATIBLE: Type = _

ANYCOMPATIBLE - pseudo-type representing a polymorphic common type

pub const ANYCOMPATIBLEARRAY: Type = _

ANYCOMPATIBLEARRAY - pseudo-type representing an array of polymorphic common type elements

pub const ANYCOMPATIBLENONARRAY: Type = _

ANYCOMPATIBLENONARRAY - pseudo-type representing a polymorphic common type that is not an array

pub const ANYCOMPATIBLE_RANGE: Type = _

ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type

pub const INT4MULTI_RANGE_ARRAY: Type = _

INT4MULTIRANGE[]

pub const NUMMULTI_RANGE_ARRAY: Type = _

NUMMULTIRANGE[]

pub const TSMULTI_RANGE_ARRAY: Type = _

TSMULTIRANGE[]

pub const TSTZMULTI_RANGE_ARRAY: Type = _

TSTZMULTIRANGE[]

pub const DATEMULTI_RANGE_ARRAY: Type = _

DATEMULTIRANGE[]

pub const INT8MULTI_RANGE_ARRAY: Type = _

INT8MULTIRANGE[]

§

impl Type

pub fn new(name: String, oid: u32, kind: Kind, schema: String) -> Type

Creates a new Type.

pub fn from_oid(oid: u32) -> Option<Type>

Returns the Type corresponding to the provided Oid if it corresponds to a built-in type.

pub fn oid(&self) -> u32

Returns the OID of the Type.

pub fn kind(&self) -> &Kind

Returns the kind of this type.

pub fn schema(&self) -> &str

Returns the schema of this type.

pub fn name(&self) -> &str

Returns the name of this type.

Trait Implementations§

§

impl Clone for Type

§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Type

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Type

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for Type

§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for Type

§

fn eq(&self, other: &Type) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for Type

§

impl StructuralEq for Type

§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more