Update CHANGELOG.md and a fix last-minute review nit

This commit is contained in:
Nickolay Ponomarev 2020-05-27 05:04:22 +03:00
parent 5aacc5ebcd
commit 320d2f2d05
3 changed files with 4 additions and 5 deletions

View file

@ -13,6 +13,7 @@ Check https://github.com/andygrove/sqlparser-rs/commits/master for undocumented
- Support Snowflake's `FROM (table_name)` (#155) - thanks @eyalleshem! - Support Snowflake's `FROM (table_name)` (#155) - thanks @eyalleshem!
### Added ### Added
- Support basic forms of `CREATE INDEX` and `DROP INDEX` (#167) - thanks @mashuai!
- Support MSSQL `TOP (<N>) [ PERCENT ] [ WITH TIES ]` (#150) - thanks @alexkyllo! - Support MSSQL `TOP (<N>) [ PERCENT ] [ WITH TIES ]` (#150) - thanks @alexkyllo!
- Support MySQL `LIMIT row_count OFFSET offset` (not followed by `ROW` or `ROWS`) and remember which variant was parsed (#158) - thanks @mjibson! - Support MySQL `LIMIT row_count OFFSET offset` (not followed by `ROW` or `ROWS`) and remember which variant was parsed (#158) - thanks @mjibson!
- Support PostgreSQL `CREATE TABLE IF NOT EXISTS table_name` (#163) - thanks @alex-dukhno! - Support PostgreSQL `CREATE TABLE IF NOT EXISTS table_name` (#163) - thanks @alex-dukhno!

View file

@ -200,6 +200,7 @@ define_keywords!(
IDENTITY, IDENTITY,
IF, IF,
IN, IN,
INDEX,
INDICATOR, INDICATOR,
INNER, INNER,
INOUT, INOUT,
@ -420,8 +421,7 @@ define_keywords!(
WORK, WORK,
YEAR, YEAR,
ZONE, ZONE,
END_EXEC = "END-EXEC", END_EXEC = "END-EXEC"
INDEX
); );
/// These keywords can't be used as a table alias, so that `FROM table_name alias` /// These keywords can't be used as a table alias, so that `FROM table_name alias`

View file

@ -943,9 +943,7 @@ impl Parser {
let index_name = self.parse_object_name()?; let index_name = self.parse_object_name()?;
self.expect_keyword("ON")?; self.expect_keyword("ON")?;
let table_name = self.parse_object_name()?; let table_name = self.parse_object_name()?;
self.expect_token(&Token::LParen)?; let columns = self.parse_parenthesized_column_list(Mandatory)?;
let columns = self.parse_comma_separated(Parser::parse_identifier)?;
self.expect_token(&Token::RParen)?;
Ok(Statement::CreateIndex { Ok(Statement::CreateIndex {
name: index_name, name: index_name,
table_name, table_name,