pub struct PgQualifiedName { /* private fields */ }Expand description
A dot-qualified PostgreSQL name.
Implementations§
Source§impl PgQualifiedName
impl PgQualifiedName
Sourcepub fn new(parts: Vec<PgIdentifier>) -> Result<Self, PgIdentifierError>
pub fn new(parts: Vec<PgIdentifier>) -> Result<Self, PgIdentifierError>
Creates a qualified name from one or more identifier parts.
§Errors
Returns PgIdentifierError::EmptyQualifiedName when parts is empty.
Sourcepub fn parse(input: &str) -> Result<Self, PgIdentifierError>
pub fn parse(input: &str) -> Result<Self, PgIdentifierError>
Parses a conservative dot-qualified name.
This is not a full SQL parser. It splits on dots and parses each segment as a PostgreSQL identifier.
§Errors
Returns PgIdentifierError when any segment is invalid.
Sourcepub fn schema_object(schema: PgIdentifier, object: PgIdentifier) -> Self
pub fn schema_object(schema: PgIdentifier, object: PgIdentifier) -> Self
Creates a two-part schema-qualified object name.
Sourcepub fn parts(&self) -> &[PgIdentifier]
pub fn parts(&self) -> &[PgIdentifier]
Returns the identifier parts.
Sourcepub fn leaf(&self) -> &PgIdentifier
pub fn leaf(&self) -> &PgIdentifier
Returns the last identifier part.
Trait Implementations§
Source§impl Clone for PgQualifiedName
impl Clone for PgQualifiedName
Source§fn clone(&self) -> PgQualifiedName
fn clone(&self) -> PgQualifiedName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PgQualifiedName
impl Debug for PgQualifiedName
Source§impl Display for PgQualifiedName
impl Display for PgQualifiedName
Source§impl FromStr for PgQualifiedName
impl FromStr for PgQualifiedName
Source§impl Hash for PgQualifiedName
impl Hash for PgQualifiedName
Source§impl Ord for PgQualifiedName
impl Ord for PgQualifiedName
Source§fn cmp(&self, other: &PgQualifiedName) -> Ordering
fn cmp(&self, other: &PgQualifiedName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PgQualifiedName
impl PartialEq for PgQualifiedName
Source§fn eq(&self, other: &PgQualifiedName) -> bool
fn eq(&self, other: &PgQualifiedName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PgQualifiedName
impl PartialOrd for PgQualifiedName
Source§impl TryFrom<&str> for PgQualifiedName
impl TryFrom<&str> for PgQualifiedName
impl Eq for PgQualifiedName
impl StructuralPartialEq for PgQualifiedName
Auto Trait Implementations§
impl Freeze for PgQualifiedName
impl RefUnwindSafe for PgQualifiedName
impl Send for PgQualifiedName
impl Sync for PgQualifiedName
impl Unpin for PgQualifiedName
impl UnsafeUnpin for PgQualifiedName
impl UnwindSafe for PgQualifiedName
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
Mutably borrows from an owned value. Read more