* * implement the ON DUPLICATE KEY syntax for MySQL in an INSERT statement
* * add MySQL to the cli example
* remove the dialect check for the ON DUPLICATE KEY insert to support
custom dialects and unwrap some missing results
* * use the Assignment DataType for the ON DUPLICATE KEY UPDATE
* * add support for table aliases in an UPDATE statement
* add support for JOINS in an UPDATE statement (for MySQL)
* * implement the MySQL ALTER TABLE CHANGE COLUMN syntax
* * fix the formatting of the else * rename the parse_identifiers_strict
to parse_identifiers_non_keywords
* Parse SUBSTRING calls that are separated with a comma instead of
keywords
* Fix the linting errors
Co-authored-by: Piotr <piotr.morawski@nc-vision.com>
Co-authored-by: Piotr Morawski <contact@peter-morawski.de>
To share helper macros between various tests/* we added a new module
(tests/macros/mod.rs). This made the prologue to be used in tests quite
long and a little weird:
```
#[macro_use]
#[path = "macros/mod.rs"]
mod macros;
use sqlparser::test_utils::*;
```
This simplifies it to:
```
#[macro_use]
mod test_utils;
use test_utils::*;
```
- and switches all existing tests to the new prologue simultaneously...
...while fixing a few other inconsistencies and adding a few comments
about the way `test_utils` work.
In MySQL it's AUTO_INCREMENT
(see https://dev.mysql.com/doc/refman/8.0/en/create-table.html)
and in SQLite it's AUTOINCREMENT.
We use `ColumnOption::DialectSpecific(Vec<Token>)` to avoid adding a new variant for each vendor-specific column option.
The Ident type was previously an alias for a String. Turn it into a full
fledged struct, so that the parser can preserve the distinction between
identifier value and quote style already made by the tokenizer's Word
structure.