pub struct TableName(/* private fields */);Expand description
A table name as it appears in the syntax tree.
This is the form that renders: ToSql escapes the name when it would
otherwise be read back as a reserved word, which is what makes
DEFINE TABLE ⟨select⟩ round-trip. It is also the form that crosses the
public boundary, since the wire’s surrealdb_types::Table is a language
value rather than an engine or storage one.
Every AST node that renders a table name goes through that impl rather than
naming an escaper itself, so how a table name escapes is decided in one
place. A node that reaches for EscapeIdent directly is not wrong today,
but it is a second place to change.
Lowering converts this to surrealdb_strand::TableName, which the engine
passes around and which carries neither capability.
Implementations§
Trait Implementations§
impl Eq for TableName
Source§impl From<TableName> for TableName
Rendering: the engine’s name becomes the syntax tree’s, so that it prints
with the escaping this layer owns.
impl From<TableName> for TableName
Rendering: the engine’s name becomes the syntax tree’s, so that it prints with the escaping this layer owns.
Source§impl Ord for TableName
impl Ord for TableName
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 PartialOrd for TableName
impl PartialOrd for TableName
impl StructuralPartialEq for TableName
Auto Trait Implementations§
impl Freeze for TableName
impl RefUnwindSafe for TableName
impl Send for TableName
impl Sync for TableName
impl Unpin for TableName
impl UnsafeUnpin for TableName
impl UnwindSafe for TableName
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.