Skip to content

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.

2 participants