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 ResourceId
s.
Sourcepub fn try_new(schema: &str, object_name: &str) -> ParseResult<Self>
pub fn try_new(schema: &str, object_name: &str) -> ParseResult<Self>
Constructor for ResourceId
s.
§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 ToString::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 more