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
[X] Please confirm you have completed any of the necessary steps below.
Included test cases to demonstrate any code changes, which may be one or more of the following:
.yml rule test cases in test/fixtures/rules/std_rule_cases.
[X] .sql/.yml parser test cases in test/fixtures/dialects (note YML files can be auto generated with tox -e generate-fixture-yml).
Full autofix test cases in test/fixtures/linter/autofix.
Other.
Added appropriate documentation for the change.
Created GitHub issues for any relevant followup/future enhancements if appropriate.
coverage: 99.985%. remained the same
when pulling 7ee8d7d000fa87887705dc68686bfe654cb2d448 on Enduriel:sqlite-missing-features
into dd04c83c9e9ae20eb28a635fc0503f2dc002ab56 on sqlfluff:main.
Brief summary of the change made
This adds
upsert
clause support withon 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 overridingansi.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
[X] Please confirm you have completed any of the necessary steps below.
Included test cases to demonstrate any code changes, which may be one or more of the following:
.yml
rule test cases intest/fixtures/rules/std_rule_cases
..sql
/.yml
parser test cases intest/fixtures/dialects
(note YML files can be auto generated withtox -e generate-fixture-yml
).test/fixtures/linter/autofix
.Added appropriate documentation for the change.
Created GitHub issues for any relevant followup/future enhancements if appropriate.