Add support for UPDATE FROM for SQLite (further to #694) (#1117)

This commit is contained in:
Greg Gaughan 2024-02-04 13:58:51 +00:00 committed by GitHub
parent df738f9b10
commit 8fae601743
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -8066,7 +8066,7 @@ impl<'a> Parser<'a> {
self.expect_keyword(Keyword::SET)?;
let assignments = self.parse_comma_separated(Parser::parse_assignment)?;
let from = if self.parse_keyword(Keyword::FROM)
&& dialect_of!(self is GenericDialect | PostgreSqlDialect | DuckDbDialect | BigQueryDialect | SnowflakeDialect | RedshiftSqlDialect | MsSqlDialect)
&& dialect_of!(self is GenericDialect | PostgreSqlDialect | DuckDbDialect | BigQueryDialect | SnowflakeDialect | RedshiftSqlDialect | MsSqlDialect | SQLiteDialect )
{
Some(self.parse_table_and_joins()?)
} else {

View file

@ -324,6 +324,7 @@ fn parse_update_set_from() {
Box::new(SnowflakeDialect {}),
Box::new(RedshiftSqlDialect {}),
Box::new(MsSqlDialect {}),
Box::new(SQLiteDialect {}),
],
options: None,
};