mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-04 13:10:31 +00:00
Support CREATE TABLE ON UPDATE <expr>
Function (#685)
* feat : OnUpdate Function Implement * feat : add GenericDialect Options
This commit is contained in:
parent
b1a000f149
commit
3e990466f8
3 changed files with 13 additions and 8 deletions
|
@ -3474,11 +3474,10 @@ impl<'a> Parser<'a> {
|
|||
Token::make_keyword("AUTOINCREMENT"),
|
||||
])))
|
||||
} else if self.parse_keywords(&[Keyword::ON, Keyword::UPDATE])
|
||||
&& dialect_of!(self is MySqlDialect)
|
||||
&& dialect_of!(self is MySqlDialect | GenericDialect)
|
||||
{
|
||||
Ok(Some(ColumnOption::DialectSpecific(vec![
|
||||
Token::make_keyword("ON UPDATE"),
|
||||
])))
|
||||
let expr = self.parse_expr()?;
|
||||
Ok(Some(ColumnOption::OnUpdate(expr)))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue