Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend SingleStoreDB support #531

Merged
merged 4 commits into from Nov 22, 2022

Conversation

TitoGrine
Copy link
Contributor

@TitoGrine TitoGrine commented Nov 21, 2022

This MR extends support for SingleStoreDB by adding new path and casting operators.

SingleStoreDB supports 3 operators for accessing fields in a JSON object (docs link):

  • :: to retrieve string in quotes (doc);
  • ::$ to retrieve and convert to an SQL string (doc);
  • ::% to retrieve and convert to an SQL number or double (doc).

SingleStoreDB also has 2 cast operators, :> and !:>, that were not contemplated before (docs link).

Tests for these cases were also added to the SingleStoreDB test file.

nene added a commit that referenced this pull request Nov 22, 2022
@nene nene merged commit 62c5361 into sql-formatter-org:master Nov 22, 2022
@nene
Copy link
Collaborator

nene commented Nov 22, 2022

Thanks!

Made a few tweaks and merged this in.

@nene
Copy link
Collaborator

nene commented Nov 22, 2022

Released these improvements in 12.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants