pub enum NodeId {
Show 21 variants
Schema(Identifier),
Table(QualifiedName),
Index(QualifiedName),
Sequence(QualifiedName),
Constraint {
table: QualifiedName,
name: Identifier,
},
View(QualifiedName),
Mv(QualifiedName),
Type(QualifiedName),
Function(QualifiedName, NormalizedArgTypes),
Procedure(QualifiedName),
Extension(Identifier),
Trigger(QualifiedName),
Publication(Identifier),
Subscription(Identifier),
EventTrigger(Identifier),
Statistic(QualifiedName),
Collation(QualifiedName),
Aggregate(QualifiedName, NormalizedArgTypes),
Cast(QualifiedName, QualifiedName),
TsDictionary(QualifiedName),
TsConfiguration(QualifiedName),
}Expand description
Identifies any IR object uniquely within a Catalog.
Schema carries an Identifier (schemas are not schema-qualified). All
other variants carry QualifiedName. Constraint is identified by
(table, name) because constraint names are scoped to their table.
Variants§
Schema(Identifier)
A schema (namespace).
Table(QualifiedName)
A table.
Index(QualifiedName)
An index.
Sequence(QualifiedName)
A sequence.
Constraint
A constraint identified by its owning table and constraint name.
Fields
table: QualifiedNameOwning table.
name: IdentifierConstraint name (the name half of the constraint’s qname).
View(QualifiedName)
A view (CREATE VIEW).
Mv(QualifiedName)
A materialized view (CREATE MATERIALIZED VIEW).
Type(QualifiedName)
A user-defined type (enum, domain, or composite).
Function(QualifiedName, NormalizedArgTypes)
A user-defined function — disambiguated by argument types (Decision 7).
Procedure(QualifiedName)
A user-defined procedure — identified by qname only (Decision 2).
Extension(Identifier)
An installed extension.
Trigger(QualifiedName)
A trigger (qname unique within schema).
Publication(Identifier)
A publication (not schema-qualified — publications are a per-database global namespace).
Subscription(Identifier)
A subscription (not schema-qualified — subscriptions are a per-database global namespace, like publications).
EventTrigger(Identifier)
A database-global event trigger.
Statistic(QualifiedName)
A statistics object (CREATE STATISTICS schema.name).
Collation(QualifiedName)
A user-defined collation (CREATE COLLATION schema.name).
The variant lands in v0.3.8 so ordering::change_node can route
collation changes correctly; the actual graph edges (column /
domain / range / composite-attribute → collation) are added in a
follow-up stage.
Aggregate(QualifiedName, NormalizedArgTypes)
A user-defined aggregate — disambiguated by argument types (aggregates
are overloadable, like functions). The aggregate depends on its state
function (SFUNC) and optional final function (FINALFUNC), both of
which are managed NodeId::Function nodes.
Cast(QualifiedName, QualifiedName)
A CREATE CAST — identified by (source_type, target_type). Not
schema-scoped; casts are database-global objects. Depends on the
conversion function (when WITH FUNCTION) and on managed source/target
types (when the types are user-defined and in the managed catalog).
TsDictionary(QualifiedName)
A CREATE TEXT SEARCH DICTIONARY — schema-scoped.
TsConfiguration(QualifiedName)
A CREATE TEXT SEARCH CONFIGURATION — schema-scoped. Depends on any
managed NodeId::TsDictionary objects referenced in its token-type
mappings.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for NodeId
Source§impl Ord for NodeId
impl Ord for NodeId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnsafeUnpin for NodeId
impl UnwindSafe for NodeId
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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