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

Cannot parse CREATE INDEX on a json text value #59

Closed
oomathias opened this issue Sep 8, 2020 · 3 comments · Fixed by #61
Closed

Cannot parse CREATE INDEX on a json text value #59

oomathias opened this issue Sep 8, 2020 · 3 comments · Fixed by #61
Labels

Comments

@oomathias
Copy link

CREATE INDEX CONCURRENTLY IF NOT EXISTS "idx_a_foo_bar" ON "a" ((foo->>'bar'));
Err(
    CheckSQL(
        ParsingSQL(
            JsonParse(
                "invalid type: map, expected a string at line 1 column 225",
            ),
        ),
    ),
)

The double parentheses are required in ((foo->>'bar')) but it looks like it's parsed as a map instead of a string.

@sbdchd sbdchd added the bug label Sep 8, 2020
@sbdchd
Copy link
Owner

sbdchd commented Sep 8, 2020

Thanks for the report! looking into it

@kodiakhq kodiakhq bot closed this as completed in #61 Sep 9, 2020
kodiakhq bot pushed a commit that referenced this issue Sep 9, 2020
Turns out `name` is an Option and that `expr` can be a more complicated
object rather than just a string.

Previously we didn't have any tests that exercised the `expr` property.

I think the issues with clippy are related to: rust-lang/rust-clippy#2604

fixes: #59
@sbdchd
Copy link
Owner

sbdchd commented Sep 9, 2020

Unclosing this since I haven't deployed this version yet

@sbdchd sbdchd reopened this Sep 9, 2020
@sbdchd
Copy link
Owner

sbdchd commented Sep 9, 2020

Should be fixed on the latest version 0.5.0 which is available on NPM or via the github releases

@sbdchd sbdchd closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants