Skip to content

Commit

Permalink
feat: support <=> operator (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
tconbeer authored Jun 8, 2023
1 parent 69234e2 commit 96ed116
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- sqlfmt now supports the `<=>` operator ([#432](https://github.com/tconbeer/sqlfmt/issues/432) - thank you [@kathykwon](https://github.com/kathykwon)!)

## [0.18.3] - 2023-05-31

- fixes a bug where multiple c-style comments (e.g., `/* comment */`) on a single line would cause sqlfmt
Expand Down
1 change: 1 addition & 0 deletions src/sqlfmt/rules/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
r"@@@?", # center point operator; also text match
r"##", # closest point
r"<->", # distance operator
r"<=>", # null-safe equals (mysql)
r"@>", # contains
r"<@", # contained by
r"<>",
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/test_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def get_rule(ruleset: List[Rule], rule_name: str) -> Rule:
(CORE, "operator", "<>"),
(CORE, "operator", "||"),
(CORE, "operator", "=>"),
(CORE, "operator", "<=>"),
(CORE, "operator", "||/"),
(CORE, "operator", "|/"),
(CORE, "operator", "#"),
Expand Down

0 comments on commit 96ed116

Please sign in to comment.