From 64e7be0c685541f3d37960ec19da777c8e335d41 Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Sun, 7 Jul 2019 02:23:10 +0300 Subject: [PATCH] Move ObjectName closer to Ident in mod.rs --- src/ast/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ast/mod.rs b/src/ast/mod.rs index b89abda9..8067ca72 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -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); + +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); - -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 {