pub struct RelationIdentity {
pub schema: String,
pub name: String,
}Expand description
Durable identity of a SQL relation.
The schema and local name are stored separately so foo and
public.foo can never become two physical catalog identities for the
same SQL object.
Fields§
§schema: String§name: StringImplementations§
Source§impl RelationIdentity
impl RelationIdentity
pub fn new(schema: impl Into<String>, name: impl Into<String>) -> Self
pub fn qualified_name(&self) -> String
Sourcepub fn canonical_and_legacy_public_names(&self) -> Vec<String>
pub fn canonical_and_legacy_public_names(&self) -> Vec<String>
Physical owner keys that can refer to this relation. New writes use
only the canonical qualified name. Catalog cleanup also accepts the
former unqualified key for public relations so data written before
relation identities became schema-aware cannot survive its owner.
Sourcepub fn from_legacy_name(value: &str) -> Result<Self, String>
pub fn from_legacy_name(value: &str) -> Result<Self, String>
Decode a SQL relation reference or a former flat catalog key.
Unqualified objects belong to public. Quoted components preserve
embedded dots and escaped quotes, so public.\"a.b\" is distinct from
\"public.a\".b all the way down to physical storage keys.
Sourcepub fn from_legacy_index_name(value: &str, table: &Self) -> Self
pub fn from_legacy_index_name(value: &str, table: &Self) -> Self
Recover an index identity from the former flat index catalog. The stored value is a decoded local identifier rather than a relation reference, so dots and quotes remain part of the local name and the owning table supplies the schema.
Trait Implementations§
Source§impl Clone for RelationIdentity
impl Clone for RelationIdentity
Source§fn clone(&self) -> RelationIdentity
fn clone(&self) -> RelationIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more