mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 10:47:22 +00:00
Move ObjectName closer to Ident in mod.rs
This commit is contained in:
parent
ac8ba107e3
commit
64e7be0c68
1 changed files with 10 additions and 10 deletions
|
@ -71,6 +71,16 @@ where
|
|||
/// Identifier name, in the originally quoted form (e.g. `"id"`)
|
||||
pub type Ident = String;
|
||||
|
||||
/// A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ObjectName(pub Vec<Ident>);
|
||||
|
||||
impl fmt::Display for ObjectName {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", display_separated(&self.0, "."))
|
||||
}
|
||||
}
|
||||
|
||||
/// An SQL expression of any type.
|
||||
///
|
||||
/// The parser does not distinguish between expressions of different types
|
||||
|
@ -593,16 +603,6 @@ impl fmt::Display for Statement {
|
|||
}
|
||||
}
|
||||
|
||||
/// A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ObjectName(pub Vec<Ident>);
|
||||
|
||||
impl fmt::Display for ObjectName {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", display_separated(&self.0, "."))
|
||||
}
|
||||
}
|
||||
|
||||
/// SQL assignment `foo = expr` as used in SQLUpdate
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Assignment {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue