Struct proof_of_sql_parser::resource_id::ResourceId
source · pub struct ResourceId { /* private fields */ }
Expand description
Unique resource identifier, like schema.object_name
.
Implementations§
source§impl ResourceId
impl ResourceId
sourcepub fn new(schema: Identifier, object_name: Identifier) -> Self
pub fn new(schema: Identifier, object_name: Identifier) -> Self
Constructor for ResourceIds.
sourcepub fn try_new(schema: &str, object_name: &str) -> ParseResult<Self>
pub fn try_new(schema: &str, object_name: &str) -> ParseResult<Self>
Constructor for ResourceIds.
§Errors
Fails if the provided schema/object_name strings aren’t valid postgres-style identifiers (excluding dollar signs). These identifiers are defined here: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS.
sourcepub fn schema(&self) -> Identifier
pub fn schema(&self) -> Identifier
The schema identifier of this ResourceId.
sourcepub fn object_name(&self) -> Identifier
pub fn object_name(&self) -> Identifier
The object_name identifier of this ResourceId.
sourcepub fn storage_format(&self) -> String
pub fn storage_format(&self) -> String
Conversion to string in the format used in KeyDB.
Space and time APIs accept a .
separator in resource ids.
However, when a resource id is stored in KeyDB, or used as a key, a :
separator is used.
This method differs from [ResourceId::to_string] by using the latter format.
Furthermore, while space and time APIs accept lowercase resource identifiers, all resource identifiers are stored internally in uppercase. This method performs that transformation as well. For more information, see https://space-and-time.atlassian.net/wiki/spaces/SE/pages/4947974/Gateway+Storage+Overview#Database-Resources.
Trait Implementations§
source§impl Clone for ResourceId
impl Clone for ResourceId
source§fn clone(&self) -> ResourceId
fn clone(&self) -> ResourceId
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResourceId
impl Debug for ResourceId
source§impl<'d> Deserialize<'d> for ResourceId
impl<'d> Deserialize<'d> for ResourceId
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'d>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'d>,
source§impl Display for ResourceId
impl Display for ResourceId
source§impl FromStr for ResourceId
impl FromStr for ResourceId
§type Err = ParseError
type Err = ParseError
source§impl Hash for ResourceId
impl Hash for ResourceId
source§impl PartialEq for ResourceId
impl PartialEq for ResourceId
source§impl Serialize for ResourceId
impl Serialize for ResourceId
impl Copy for ResourceId
impl Eq for ResourceId
impl StructuralPartialEq for ResourceId
Auto Trait Implementations§
impl Freeze for ResourceId
impl RefUnwindSafe for ResourceId
impl Send for ResourceId
impl Sync for ResourceId
impl Unpin for ResourceId
impl UnwindSafe for ResourceId
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.