From cfb77912f78b3baa6aabc3ae6fec5629bd4a7316 Mon Sep 17 00:00:00 2001 From: Nickolay Ponomarev Date: Sun, 9 Jun 2019 22:01:14 +0300 Subject: [PATCH] Mention SQLSelectItem::Wildcard in ASTNode::SQLWildcard docs as a follow-up to https://github.com/andygrove/sqlparser-rs/issues/52 --- src/sqlast/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sqlast/mod.rs b/src/sqlast/mod.rs index aa0c2e07..8de3a803 100644 --- a/src/sqlast/mod.rs +++ b/src/sqlast/mod.rs @@ -56,9 +56,12 @@ pub type SQLIdent = String; pub enum ASTNode { /// Identifier e.g. table name or column name SQLIdentifier(SQLIdent), - /// Unqualified wildcard (`*`). SQL allows this in limited contexts (such as right - /// after `SELECT` or as part of an aggregate function, e.g. `COUNT(*)`, but we - /// currently accept it in contexts where it doesn't make sense, such as `* + *` + /// Unqualified wildcard (`*`). SQL allows this in limited contexts, such as: + /// - right after `SELECT` (which is represented as a [SQLSelectItem::Wildcard] instead) + /// - or as part of an aggregate function, e.g. `COUNT(*)`, + /// + /// ...but we currently also accept it in contexts where it doesn't make + /// sense, such as `* + *` SQLWildcard, /// Qualified wildcard, e.g. `alias.*` or `schema.table.*`. /// (Same caveats apply to SQLQualifiedWildcard as to SQLWildcard.)