sqlfluff / sqlfluff

A modular SQL linter and auto-formatter with support for multiple dialects and templated code.
https://www.sqlfluff.com
MIT License
7.31k stars 648 forks source link

Add upsert clause support to SQLite dialect #5886

Closed Enduriel closed 2 weeks ago

Enduriel commented 2 weeks ago

Brief summary of the change made

This adds upsert clause support with on conflict to the sqlite dialect, as described here. Makes progress on #3872, but that still needs https://www.sqlite.org/lang_conflict.html to be implemented which requires overriding ansi.ColumnConstraintSegment entirely, which I'm hoping to do in another PR as in comparison this PR is relatively straightforward.

Are there any other side effects of this change that we should be aware of?

No

Pull Request checklist

github-actions[bot] commented 2 weeks ago

Coverage Results ✅

Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL   17749      0   100%

225 files skipped due to complete coverage.
coveralls commented 2 weeks ago

Coverage Status

coverage: 99.985%. remained the same when pulling 7ee8d7d000fa87887705dc68686bfe654cb2d448 on Enduriel:sqlite-missing-features into dd04c83c9e9ae20eb28a635fc0503f2dc002ab56 on sqlfluff:main.

Enduriel commented 2 weeks ago

Closed in favor of #5888