Skip to content

unable to make sql query with coder: JSON and psql #86

@GuillaumeM59

Description

@GuillaumeM59

Hi,
I tried to execute sql query with postgresql on my typed store column but nothing return.
I'm looking to make scopes and sql queries using settings.

I have two users with 'foo' settings set to true.
User.where('("settings"-->>'foo')::boolean IS TRUE').size #=> 0 instead 2

You can find exemple with rspec test here:
https://github.com/GuillaumeM59/typed_store_sql_query

it's look like postgresql jsonb data is over stringified ...

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions