apache / datafusion-sqlparser-rs

Extensible SQL Lexer and Parser for Rust
Apache License 2.0
2.81k stars 543 forks source link

support SQLite's `UPDATE OR REPLACE` #1529

Closed lovasoa closed 1 week ago

lovasoa commented 1 week ago

SQLite's update statement supports an OR REPLACE clause.

UPDATE OR REPLACE t SET n = n+1;

See: https://www.sqlite.org/lang_update.html

Initially reported in https://github.com/sqlpage/SQLPage/discussions/695