mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-19 05:30:19 +00:00
add on update for my sql (#522)
This commit is contained in:
parent
ca15a4edbf
commit
99697d26e1
2 changed files with 31 additions and 0 deletions
|
@ -2254,6 +2254,12 @@ impl<'a> Parser<'a> {
|
|||
Ok(Some(ColumnOption::DialectSpecific(vec![
|
||||
Token::make_keyword("AUTOINCREMENT"),
|
||||
])))
|
||||
} else if self.parse_keywords(&[Keyword::ON, Keyword::UPDATE])
|
||||
&& dialect_of!(self is MySqlDialect)
|
||||
{
|
||||
Ok(Some(ColumnOption::DialectSpecific(vec![
|
||||
Token::make_keyword("ON UPDATE"),
|
||||
])))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue