Add multirange kind and run cargo fmt

This commit is contained in:
Joseph Koshakow 2022-11-21 16:52:58 -05:00
parent f413e66b14
commit 0c86f9362f
4 changed files with 216 additions and 564 deletions

View File

@ -17,6 +17,7 @@ struct Type {
variant: String, variant: String,
ident: String, ident: String,
kind: String, kind: String,
typtype: Option<String>,
element: u32, element: u32,
doc: String, doc: String,
} }
@ -217,12 +218,18 @@ fn parse_types() -> BTreeMap<u32, Type> {
continue; continue;
} }
let typtype = raw_type.get("typtype").cloned();
let element = match &*kind { let element = match &*kind {
"R" => match &*raw_type["typtype"] { "R" => match typtype
.as_ref()
.expect("range type must have typtype")
.as_str()
{
"r" => range_elements[&oid], "r" => range_elements[&oid],
"m" => multi_range_elements[&oid], "m" => multi_range_elements[&oid],
typtype => panic!("invalid range typtype {}", typtype), typtype => panic!("invalid range typtype {}", typtype),
} },
"A" => oids_by_name[&raw_type["typelem"]], "A" => oids_by_name[&raw_type["typelem"]],
_ => 0, _ => 0,
}; };
@ -248,6 +255,7 @@ fn parse_types() -> BTreeMap<u32, Type> {
variant, variant,
ident, ident,
kind: "A".to_string(), kind: "A".to_string(),
typtype: None,
element: oid, element: oid,
doc, doc,
}; };
@ -259,6 +267,7 @@ fn parse_types() -> BTreeMap<u32, Type> {
variant, variant,
ident, ident,
kind, kind,
typtype,
element, element,
doc, doc,
}; };
@ -362,7 +371,16 @@ fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
let kind = match &*type_.kind { let kind = match &*type_.kind {
"P" => "Pseudo".to_owned(), "P" => "Pseudo".to_owned(),
"A" => format!("Array(Type(Inner::{}))", types[&type_.element].variant), "A" => format!("Array(Type(Inner::{}))", types[&type_.element].variant),
"R" => format!("Range(Type(Inner::{}))", types[&type_.element].variant), "R" => match type_
.typtype
.as_ref()
.expect("range type must have typtype")
.as_str()
{
"r" => format!("Range(Type(Inner::{}))", types[&type_.element].variant),
"m" => format!("Multirange(Type(Inner::{}))", types[&type_.element].variant),
typtype => panic!("invalid range typtype {}", typtype),
},
_ => "Simple".to_owned(), _ => "Simple".to_owned(),
}; };

View File

@ -320,6 +320,8 @@ pub enum Kind {
Array(Type), Array(Type),
/// A range type along with the type of its elements. /// A range type along with the type of its elements.
Range(Type), Range(Type),
/// A multirange type along with the type of its elements.
Multirange(Type),
/// A domain type along with its underlying type. /// A domain type along with its underlying type.
Domain(Type), Domain(Type),
/// A composite type along with information about its fields. /// A composite type along with information about its fields.

View File

@ -1,7 +1,7 @@
// Autogenerated file - DO NOT EDIT // Autogenerated file - DO NOT EDIT
use std::sync::Arc; use std::sync::Arc;
use crate::{Type, Oid, Kind}; use crate::{Kind, Oid, Type};
#[derive(PartialEq, Eq, Debug, Hash)] #[derive(PartialEq, Eq, Debug, Hash)]
pub struct Other { pub struct Other {
@ -586,561 +586,191 @@ impl Inner {
pub fn kind(&self) -> &Kind { pub fn kind(&self) -> &Kind {
match *self { match *self {
Inner::Bool => { Inner::Bool => &Kind::Simple,
&Kind::Simple Inner::Bytea => &Kind::Simple,
} Inner::Char => &Kind::Simple,
Inner::Bytea => { Inner::Name => &Kind::Simple,
&Kind::Simple Inner::Int8 => &Kind::Simple,
} Inner::Int2 => &Kind::Simple,
Inner::Char => { Inner::Int2Vector => &Kind::Array(Type(Inner::Int2)),
&Kind::Simple Inner::Int4 => &Kind::Simple,
} Inner::Regproc => &Kind::Simple,
Inner::Name => { Inner::Text => &Kind::Simple,
&Kind::Simple Inner::Oid => &Kind::Simple,
} Inner::Tid => &Kind::Simple,
Inner::Int8 => { Inner::Xid => &Kind::Simple,
&Kind::Simple Inner::Cid => &Kind::Simple,
} Inner::OidVector => &Kind::Array(Type(Inner::Oid)),
Inner::Int2 => { Inner::PgDdlCommand => &Kind::Pseudo,
&Kind::Simple Inner::Json => &Kind::Simple,
} Inner::Xml => &Kind::Simple,
Inner::Int2Vector => { Inner::XmlArray => &Kind::Array(Type(Inner::Xml)),
&Kind::Array(Type(Inner::Int2)) Inner::PgNodeTree => &Kind::Simple,
} Inner::JsonArray => &Kind::Array(Type(Inner::Json)),
Inner::Int4 => { Inner::TableAmHandler => &Kind::Pseudo,
&Kind::Simple Inner::Xid8Array => &Kind::Array(Type(Inner::Xid8)),
} Inner::IndexAmHandler => &Kind::Pseudo,
Inner::Regproc => { Inner::Point => &Kind::Simple,
&Kind::Simple Inner::Lseg => &Kind::Simple,
} Inner::Path => &Kind::Simple,
Inner::Text => { Inner::Box => &Kind::Simple,
&Kind::Simple Inner::Polygon => &Kind::Simple,
} Inner::Line => &Kind::Simple,
Inner::Oid => { Inner::LineArray => &Kind::Array(Type(Inner::Line)),
&Kind::Simple Inner::Cidr => &Kind::Simple,
} Inner::CidrArray => &Kind::Array(Type(Inner::Cidr)),
Inner::Tid => { Inner::Float4 => &Kind::Simple,
&Kind::Simple Inner::Float8 => &Kind::Simple,
} Inner::Unknown => &Kind::Simple,
Inner::Xid => { Inner::Circle => &Kind::Simple,
&Kind::Simple Inner::CircleArray => &Kind::Array(Type(Inner::Circle)),
} Inner::Macaddr8 => &Kind::Simple,
Inner::Cid => { Inner::Macaddr8Array => &Kind::Array(Type(Inner::Macaddr8)),
&Kind::Simple Inner::Money => &Kind::Simple,
} Inner::MoneyArray => &Kind::Array(Type(Inner::Money)),
Inner::OidVector => { Inner::Macaddr => &Kind::Simple,
&Kind::Array(Type(Inner::Oid)) Inner::Inet => &Kind::Simple,
} Inner::BoolArray => &Kind::Array(Type(Inner::Bool)),
Inner::PgDdlCommand => { Inner::ByteaArray => &Kind::Array(Type(Inner::Bytea)),
&Kind::Pseudo Inner::CharArray => &Kind::Array(Type(Inner::Char)),
} Inner::NameArray => &Kind::Array(Type(Inner::Name)),
Inner::Json => { Inner::Int2Array => &Kind::Array(Type(Inner::Int2)),
&Kind::Simple Inner::Int2VectorArray => &Kind::Array(Type(Inner::Int2Vector)),
} Inner::Int4Array => &Kind::Array(Type(Inner::Int4)),
Inner::Xml => { Inner::RegprocArray => &Kind::Array(Type(Inner::Regproc)),
&Kind::Simple Inner::TextArray => &Kind::Array(Type(Inner::Text)),
} Inner::TidArray => &Kind::Array(Type(Inner::Tid)),
Inner::XmlArray => { Inner::XidArray => &Kind::Array(Type(Inner::Xid)),
&Kind::Array(Type(Inner::Xml)) Inner::CidArray => &Kind::Array(Type(Inner::Cid)),
} Inner::OidVectorArray => &Kind::Array(Type(Inner::OidVector)),
Inner::PgNodeTree => { Inner::BpcharArray => &Kind::Array(Type(Inner::Bpchar)),
&Kind::Simple Inner::VarcharArray => &Kind::Array(Type(Inner::Varchar)),
} Inner::Int8Array => &Kind::Array(Type(Inner::Int8)),
Inner::JsonArray => { Inner::PointArray => &Kind::Array(Type(Inner::Point)),
&Kind::Array(Type(Inner::Json)) Inner::LsegArray => &Kind::Array(Type(Inner::Lseg)),
} Inner::PathArray => &Kind::Array(Type(Inner::Path)),
Inner::TableAmHandler => { Inner::BoxArray => &Kind::Array(Type(Inner::Box)),
&Kind::Pseudo Inner::Float4Array => &Kind::Array(Type(Inner::Float4)),
} Inner::Float8Array => &Kind::Array(Type(Inner::Float8)),
Inner::Xid8Array => { Inner::PolygonArray => &Kind::Array(Type(Inner::Polygon)),
&Kind::Array(Type(Inner::Xid8)) Inner::OidArray => &Kind::Array(Type(Inner::Oid)),
} Inner::Aclitem => &Kind::Simple,
Inner::IndexAmHandler => { Inner::AclitemArray => &Kind::Array(Type(Inner::Aclitem)),
&Kind::Pseudo Inner::MacaddrArray => &Kind::Array(Type(Inner::Macaddr)),
} Inner::InetArray => &Kind::Array(Type(Inner::Inet)),
Inner::Point => { Inner::Bpchar => &Kind::Simple,
&Kind::Simple Inner::Varchar => &Kind::Simple,
} Inner::Date => &Kind::Simple,
Inner::Lseg => { Inner::Time => &Kind::Simple,
&Kind::Simple Inner::Timestamp => &Kind::Simple,
} Inner::TimestampArray => &Kind::Array(Type(Inner::Timestamp)),
Inner::Path => { Inner::DateArray => &Kind::Array(Type(Inner::Date)),
&Kind::Simple Inner::TimeArray => &Kind::Array(Type(Inner::Time)),
} Inner::Timestamptz => &Kind::Simple,
Inner::Box => { Inner::TimestamptzArray => &Kind::Array(Type(Inner::Timestamptz)),
&Kind::Simple Inner::Interval => &Kind::Simple,
} Inner::IntervalArray => &Kind::Array(Type(Inner::Interval)),
Inner::Polygon => { Inner::NumericArray => &Kind::Array(Type(Inner::Numeric)),
&Kind::Simple Inner::CstringArray => &Kind::Array(Type(Inner::Cstring)),
} Inner::Timetz => &Kind::Simple,
Inner::Line => { Inner::TimetzArray => &Kind::Array(Type(Inner::Timetz)),
&Kind::Simple Inner::Bit => &Kind::Simple,
} Inner::BitArray => &Kind::Array(Type(Inner::Bit)),
Inner::LineArray => { Inner::Varbit => &Kind::Simple,
&Kind::Array(Type(Inner::Line)) Inner::VarbitArray => &Kind::Array(Type(Inner::Varbit)),
} Inner::Numeric => &Kind::Simple,
Inner::Cidr => { Inner::Refcursor => &Kind::Simple,
&Kind::Simple Inner::RefcursorArray => &Kind::Array(Type(Inner::Refcursor)),
} Inner::Regprocedure => &Kind::Simple,
Inner::CidrArray => { Inner::Regoper => &Kind::Simple,
&Kind::Array(Type(Inner::Cidr)) Inner::Regoperator => &Kind::Simple,
} Inner::Regclass => &Kind::Simple,
Inner::Float4 => { Inner::Regtype => &Kind::Simple,
&Kind::Simple Inner::RegprocedureArray => &Kind::Array(Type(Inner::Regprocedure)),
} Inner::RegoperArray => &Kind::Array(Type(Inner::Regoper)),
Inner::Float8 => { Inner::RegoperatorArray => &Kind::Array(Type(Inner::Regoperator)),
&Kind::Simple Inner::RegclassArray => &Kind::Array(Type(Inner::Regclass)),
} Inner::RegtypeArray => &Kind::Array(Type(Inner::Regtype)),
Inner::Unknown => { Inner::Record => &Kind::Pseudo,
&Kind::Simple Inner::Cstring => &Kind::Pseudo,
} Inner::Any => &Kind::Pseudo,
Inner::Circle => { Inner::Anyarray => &Kind::Pseudo,
&Kind::Simple Inner::Void => &Kind::Pseudo,
} Inner::Trigger => &Kind::Pseudo,
Inner::CircleArray => { Inner::LanguageHandler => &Kind::Pseudo,
&Kind::Array(Type(Inner::Circle)) Inner::Internal => &Kind::Pseudo,
} Inner::Anyelement => &Kind::Pseudo,
Inner::Macaddr8 => { Inner::RecordArray => &Kind::Pseudo,
&Kind::Simple Inner::Anynonarray => &Kind::Pseudo,
} Inner::TxidSnapshotArray => &Kind::Array(Type(Inner::TxidSnapshot)),
Inner::Macaddr8Array => { Inner::Uuid => &Kind::Simple,
&Kind::Array(Type(Inner::Macaddr8)) Inner::UuidArray => &Kind::Array(Type(Inner::Uuid)),
} Inner::TxidSnapshot => &Kind::Simple,
Inner::Money => { Inner::FdwHandler => &Kind::Pseudo,
&Kind::Simple Inner::PgLsn => &Kind::Simple,
} Inner::PgLsnArray => &Kind::Array(Type(Inner::PgLsn)),
Inner::MoneyArray => { Inner::TsmHandler => &Kind::Pseudo,
&Kind::Array(Type(Inner::Money)) Inner::PgNdistinct => &Kind::Simple,
} Inner::PgDependencies => &Kind::Simple,
Inner::Macaddr => { Inner::Anyenum => &Kind::Pseudo,
&Kind::Simple Inner::TsVector => &Kind::Simple,
} Inner::Tsquery => &Kind::Simple,
Inner::Inet => { Inner::GtsVector => &Kind::Simple,
&Kind::Simple Inner::TsVectorArray => &Kind::Array(Type(Inner::TsVector)),
} Inner::GtsVectorArray => &Kind::Array(Type(Inner::GtsVector)),
Inner::BoolArray => { Inner::TsqueryArray => &Kind::Array(Type(Inner::Tsquery)),
&Kind::Array(Type(Inner::Bool)) Inner::Regconfig => &Kind::Simple,
} Inner::RegconfigArray => &Kind::Array(Type(Inner::Regconfig)),
Inner::ByteaArray => { Inner::Regdictionary => &Kind::Simple,
&Kind::Array(Type(Inner::Bytea)) Inner::RegdictionaryArray => &Kind::Array(Type(Inner::Regdictionary)),
} Inner::Jsonb => &Kind::Simple,
Inner::CharArray => { Inner::JsonbArray => &Kind::Array(Type(Inner::Jsonb)),
&Kind::Array(Type(Inner::Char)) Inner::AnyRange => &Kind::Pseudo,
} Inner::EventTrigger => &Kind::Pseudo,
Inner::NameArray => { Inner::Int4Range => &Kind::Range(Type(Inner::Int4)),
&Kind::Array(Type(Inner::Name)) Inner::Int4RangeArray => &Kind::Array(Type(Inner::Int4Range)),
} Inner::NumRange => &Kind::Range(Type(Inner::Numeric)),
Inner::Int2Array => { Inner::NumRangeArray => &Kind::Array(Type(Inner::NumRange)),
&Kind::Array(Type(Inner::Int2)) Inner::TsRange => &Kind::Range(Type(Inner::Timestamp)),
} Inner::TsRangeArray => &Kind::Array(Type(Inner::TsRange)),
Inner::Int2VectorArray => { Inner::TstzRange => &Kind::Range(Type(Inner::Timestamptz)),
&Kind::Array(Type(Inner::Int2Vector)) Inner::TstzRangeArray => &Kind::Array(Type(Inner::TstzRange)),
} Inner::DateRange => &Kind::Range(Type(Inner::Date)),
Inner::Int4Array => { Inner::DateRangeArray => &Kind::Array(Type(Inner::DateRange)),
&Kind::Array(Type(Inner::Int4)) Inner::Int8Range => &Kind::Range(Type(Inner::Int8)),
} Inner::Int8RangeArray => &Kind::Array(Type(Inner::Int8Range)),
Inner::RegprocArray => { Inner::Jsonpath => &Kind::Simple,
&Kind::Array(Type(Inner::Regproc)) Inner::JsonpathArray => &Kind::Array(Type(Inner::Jsonpath)),
} Inner::Regnamespace => &Kind::Simple,
Inner::TextArray => { Inner::RegnamespaceArray => &Kind::Array(Type(Inner::Regnamespace)),
&Kind::Array(Type(Inner::Text)) Inner::Regrole => &Kind::Simple,
} Inner::RegroleArray => &Kind::Array(Type(Inner::Regrole)),
Inner::TidArray => { Inner::Regcollation => &Kind::Simple,
&Kind::Array(Type(Inner::Tid)) Inner::RegcollationArray => &Kind::Array(Type(Inner::Regcollation)),
} Inner::Int4multiRange => &Kind::Multirange(Type(Inner::Int4)),
Inner::XidArray => { Inner::NummultiRange => &Kind::Multirange(Type(Inner::Numeric)),
&Kind::Array(Type(Inner::Xid)) Inner::TsmultiRange => &Kind::Multirange(Type(Inner::Timestamp)),
} Inner::TstzmultiRange => &Kind::Multirange(Type(Inner::Timestamptz)),
Inner::CidArray => { Inner::DatemultiRange => &Kind::Multirange(Type(Inner::Date)),
&Kind::Array(Type(Inner::Cid)) Inner::Int8multiRange => &Kind::Multirange(Type(Inner::Int8)),
} Inner::AnymultiRange => &Kind::Pseudo,
Inner::OidVectorArray => { Inner::AnycompatiblemultiRange => &Kind::Pseudo,
&Kind::Array(Type(Inner::OidVector)) Inner::PgBrinBloomSummary => &Kind::Simple,
} Inner::PgBrinMinmaxMultiSummary => &Kind::Simple,
Inner::BpcharArray => { Inner::PgMcvList => &Kind::Simple,
&Kind::Array(Type(Inner::Bpchar)) Inner::PgSnapshot => &Kind::Simple,
} Inner::PgSnapshotArray => &Kind::Array(Type(Inner::PgSnapshot)),
Inner::VarcharArray => { Inner::Xid8 => &Kind::Simple,
&Kind::Array(Type(Inner::Varchar)) Inner::Anycompatible => &Kind::Pseudo,
} Inner::Anycompatiblearray => &Kind::Pseudo,
Inner::Int8Array => { Inner::Anycompatiblenonarray => &Kind::Pseudo,
&Kind::Array(Type(Inner::Int8)) Inner::AnycompatibleRange => &Kind::Pseudo,
} Inner::Int4multiRangeArray => &Kind::Array(Type(Inner::Int4multiRange)),
Inner::PointArray => { Inner::NummultiRangeArray => &Kind::Array(Type(Inner::NummultiRange)),
&Kind::Array(Type(Inner::Point)) Inner::TsmultiRangeArray => &Kind::Array(Type(Inner::TsmultiRange)),
} Inner::TstzmultiRangeArray => &Kind::Array(Type(Inner::TstzmultiRange)),
Inner::LsegArray => { Inner::DatemultiRangeArray => &Kind::Array(Type(Inner::DatemultiRange)),
&Kind::Array(Type(Inner::Lseg)) Inner::Int8multiRangeArray => &Kind::Array(Type(Inner::Int8multiRange)),
}
Inner::PathArray => {
&Kind::Array(Type(Inner::Path))
}
Inner::BoxArray => {
&Kind::Array(Type(Inner::Box))
}
Inner::Float4Array => {
&Kind::Array(Type(Inner::Float4))
}
Inner::Float8Array => {
&Kind::Array(Type(Inner::Float8))
}
Inner::PolygonArray => {
&Kind::Array(Type(Inner::Polygon))
}
Inner::OidArray => {
&Kind::Array(Type(Inner::Oid))
}
Inner::Aclitem => {
&Kind::Simple
}
Inner::AclitemArray => {
&Kind::Array(Type(Inner::Aclitem))
}
Inner::MacaddrArray => {
&Kind::Array(Type(Inner::Macaddr))
}
Inner::InetArray => {
&Kind::Array(Type(Inner::Inet))
}
Inner::Bpchar => {
&Kind::Simple
}
Inner::Varchar => {
&Kind::Simple
}
Inner::Date => {
&Kind::Simple
}
Inner::Time => {
&Kind::Simple
}
Inner::Timestamp => {
&Kind::Simple
}
Inner::TimestampArray => {
&Kind::Array(Type(Inner::Timestamp))
}
Inner::DateArray => {
&Kind::Array(Type(Inner::Date))
}
Inner::TimeArray => {
&Kind::Array(Type(Inner::Time))
}
Inner::Timestamptz => {
&Kind::Simple
}
Inner::TimestamptzArray => {
&Kind::Array(Type(Inner::Timestamptz))
}
Inner::Interval => {
&Kind::Simple
}
Inner::IntervalArray => {
&Kind::Array(Type(Inner::Interval))
}
Inner::NumericArray => {
&Kind::Array(Type(Inner::Numeric))
}
Inner::CstringArray => {
&Kind::Array(Type(Inner::Cstring))
}
Inner::Timetz => {
&Kind::Simple
}
Inner::TimetzArray => {
&Kind::Array(Type(Inner::Timetz))
}
Inner::Bit => {
&Kind::Simple
}
Inner::BitArray => {
&Kind::Array(Type(Inner::Bit))
}
Inner::Varbit => {
&Kind::Simple
}
Inner::VarbitArray => {
&Kind::Array(Type(Inner::Varbit))
}
Inner::Numeric => {
&Kind::Simple
}
Inner::Refcursor => {
&Kind::Simple
}
Inner::RefcursorArray => {
&Kind::Array(Type(Inner::Refcursor))
}
Inner::Regprocedure => {
&Kind::Simple
}
Inner::Regoper => {
&Kind::Simple
}
Inner::Regoperator => {
&Kind::Simple
}
Inner::Regclass => {
&Kind::Simple
}
Inner::Regtype => {
&Kind::Simple
}
Inner::RegprocedureArray => {
&Kind::Array(Type(Inner::Regprocedure))
}
Inner::RegoperArray => {
&Kind::Array(Type(Inner::Regoper))
}
Inner::RegoperatorArray => {
&Kind::Array(Type(Inner::Regoperator))
}
Inner::RegclassArray => {
&Kind::Array(Type(Inner::Regclass))
}
Inner::RegtypeArray => {
&Kind::Array(Type(Inner::Regtype))
}
Inner::Record => {
&Kind::Pseudo
}
Inner::Cstring => {
&Kind::Pseudo
}
Inner::Any => {
&Kind::Pseudo
}
Inner::Anyarray => {
&Kind::Pseudo
}
Inner::Void => {
&Kind::Pseudo
}
Inner::Trigger => {
&Kind::Pseudo
}
Inner::LanguageHandler => {
&Kind::Pseudo
}
Inner::Internal => {
&Kind::Pseudo
}
Inner::Anyelement => {
&Kind::Pseudo
}
Inner::RecordArray => {
&Kind::Pseudo
}
Inner::Anynonarray => {
&Kind::Pseudo
}
Inner::TxidSnapshotArray => {
&Kind::Array(Type(Inner::TxidSnapshot))
}
Inner::Uuid => {
&Kind::Simple
}
Inner::UuidArray => {
&Kind::Array(Type(Inner::Uuid))
}
Inner::TxidSnapshot => {
&Kind::Simple
}
Inner::FdwHandler => {
&Kind::Pseudo
}
Inner::PgLsn => {
&Kind::Simple
}
Inner::PgLsnArray => {
&Kind::Array(Type(Inner::PgLsn))
}
Inner::TsmHandler => {
&Kind::Pseudo
}
Inner::PgNdistinct => {
&Kind::Simple
}
Inner::PgDependencies => {
&Kind::Simple
}
Inner::Anyenum => {
&Kind::Pseudo
}
Inner::TsVector => {
&Kind::Simple
}
Inner::Tsquery => {
&Kind::Simple
}
Inner::GtsVector => {
&Kind::Simple
}
Inner::TsVectorArray => {
&Kind::Array(Type(Inner::TsVector))
}
Inner::GtsVectorArray => {
&Kind::Array(Type(Inner::GtsVector))
}
Inner::TsqueryArray => {
&Kind::Array(Type(Inner::Tsquery))
}
Inner::Regconfig => {
&Kind::Simple
}
Inner::RegconfigArray => {
&Kind::Array(Type(Inner::Regconfig))
}
Inner::Regdictionary => {
&Kind::Simple
}
Inner::RegdictionaryArray => {
&Kind::Array(Type(Inner::Regdictionary))
}
Inner::Jsonb => {
&Kind::Simple
}
Inner::JsonbArray => {
&Kind::Array(Type(Inner::Jsonb))
}
Inner::AnyRange => {
&Kind::Pseudo
}
Inner::EventTrigger => {
&Kind::Pseudo
}
Inner::Int4Range => {
&Kind::Range(Type(Inner::Int4))
}
Inner::Int4RangeArray => {
&Kind::Array(Type(Inner::Int4Range))
}
Inner::NumRange => {
&Kind::Range(Type(Inner::Numeric))
}
Inner::NumRangeArray => {
&Kind::Array(Type(Inner::NumRange))
}
Inner::TsRange => {
&Kind::Range(Type(Inner::Timestamp))
}
Inner::TsRangeArray => {
&Kind::Array(Type(Inner::TsRange))
}
Inner::TstzRange => {
&Kind::Range(Type(Inner::Timestamptz))
}
Inner::TstzRangeArray => {
&Kind::Array(Type(Inner::TstzRange))
}
Inner::DateRange => {
&Kind::Range(Type(Inner::Date))
}
Inner::DateRangeArray => {
&Kind::Array(Type(Inner::DateRange))
}
Inner::Int8Range => {
&Kind::Range(Type(Inner::Int8))
}
Inner::Int8RangeArray => {
&Kind::Array(Type(Inner::Int8Range))
}
Inner::Jsonpath => {
&Kind::Simple
}
Inner::JsonpathArray => {
&Kind::Array(Type(Inner::Jsonpath))
}
Inner::Regnamespace => {
&Kind::Simple
}
Inner::RegnamespaceArray => {
&Kind::Array(Type(Inner::Regnamespace))
}
Inner::Regrole => {
&Kind::Simple
}
Inner::RegroleArray => {
&Kind::Array(Type(Inner::Regrole))
}
Inner::Regcollation => {
&Kind::Simple
}
Inner::RegcollationArray => {
&Kind::Array(Type(Inner::Regcollation))
}
Inner::Int4multiRange => {
&Kind::Range(Type(Inner::Int4))
}
Inner::NummultiRange => {
&Kind::Range(Type(Inner::Numeric))
}
Inner::TsmultiRange => {
&Kind::Range(Type(Inner::Timestamp))
}
Inner::TstzmultiRange => {
&Kind::Range(Type(Inner::Timestamptz))
}
Inner::DatemultiRange => {
&Kind::Range(Type(Inner::Date))
}
Inner::Int8multiRange => {
&Kind::Range(Type(Inner::Int8))
}
Inner::AnymultiRange => {
&Kind::Pseudo
}
Inner::AnycompatiblemultiRange => {
&Kind::Pseudo
}
Inner::PgBrinBloomSummary => {
&Kind::Simple
}
Inner::PgBrinMinmaxMultiSummary => {
&Kind::Simple
}
Inner::PgMcvList => {
&Kind::Simple
}
Inner::PgSnapshot => {
&Kind::Simple
}
Inner::PgSnapshotArray => {
&Kind::Array(Type(Inner::PgSnapshot))
}
Inner::Xid8 => {
&Kind::Simple
}
Inner::Anycompatible => {
&Kind::Pseudo
}
Inner::Anycompatiblearray => {
&Kind::Pseudo
}
Inner::Anycompatiblenonarray => {
&Kind::Pseudo
}
Inner::AnycompatibleRange => {
&Kind::Pseudo
}
Inner::Int4multiRangeArray => {
&Kind::Array(Type(Inner::Int4multiRange))
}
Inner::NummultiRangeArray => {
&Kind::Array(Type(Inner::NummultiRange))
}
Inner::TsmultiRangeArray => {
&Kind::Array(Type(Inner::TsmultiRange))
}
Inner::TstzmultiRangeArray => {
&Kind::Array(Type(Inner::TstzmultiRange))
}
Inner::DatemultiRangeArray => {
&Kind::Array(Type(Inner::DatemultiRange))
}
Inner::Int8multiRangeArray => {
&Kind::Array(Type(Inner::Int8multiRange))
}
Inner::Other(ref u) => &u.kind, Inner::Other(ref u) => &u.kind,
} }
} }

View File

@ -365,7 +365,8 @@ impl SqlState {
pub const DIAGNOSTICS_EXCEPTION: SqlState = SqlState(Inner::E0Z000); pub const DIAGNOSTICS_EXCEPTION: SqlState = SqlState(Inner::E0Z000);
/// 0Z002 /// 0Z002
pub const STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER: SqlState = SqlState(Inner::E0Z002); pub const STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER: SqlState =
SqlState(Inner::E0Z002);
/// 20000 /// 20000
pub const CASE_NOT_FOUND: SqlState = SqlState(Inner::E20000); pub const CASE_NOT_FOUND: SqlState = SqlState(Inner::E20000);
@ -623,7 +624,8 @@ impl SqlState {
pub const INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION: SqlState = SqlState(Inner::E25003); pub const INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION: SqlState = SqlState(Inner::E25003);
/// 25004 /// 25004
pub const INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION: SqlState = SqlState(Inner::E25004); pub const INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION: SqlState =
SqlState(Inner::E25004);
/// 25005 /// 25005
pub const NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION: SqlState = SqlState(Inner::E25005); pub const NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION: SqlState = SqlState(Inner::E25005);