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>, ) -> RelationIdentity
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<RelationIdentity, String>
pub fn from_legacy_name(value: &str) -> Result<RelationIdentity, 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: &RelationIdentity,
) -> RelationIdentity
pub fn from_legacy_index_name( value: &str, table: &RelationIdentity, ) -> RelationIdentity
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 moreSource§impl Debug for RelationIdentity
impl Debug for RelationIdentity
Source§impl<'de> Deserialize<'de> for RelationIdentity
impl<'de> Deserialize<'de> for RelationIdentity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelationIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelationIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for RelationIdentity
Source§impl Ord for RelationIdentity
impl Ord for RelationIdentity
Source§fn cmp(&self, other: &RelationIdentity) -> Ordering
fn cmp(&self, other: &RelationIdentity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RelationIdentity
impl PartialEq for RelationIdentity
Source§impl PartialOrd for RelationIdentity
impl PartialOrd for RelationIdentity
Source§impl Serialize for RelationIdentity
impl Serialize for RelationIdentity
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for RelationIdentity
Auto Trait Implementations§
impl Freeze for RelationIdentity
impl RefUnwindSafe for RelationIdentity
impl Send for RelationIdentity
impl Sync for RelationIdentity
impl Unpin for RelationIdentity
impl UnsafeUnpin for RelationIdentity
impl UnwindSafe for RelationIdentity
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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