Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Support for PostgreSQL arrays #413

@rapides

Description

@rapides

I'm looking for something like this:

Pitch.joins{pitch_permission}.where{pitch_permission.invest_permissions.op('@>', 'ARRAY[5]::int[]')}

but it currently doesn't work this way:

Pitch Load (1.1ms) SELECT "pitches".* FROM "pitches" INNER JOIN "pitch_permissions" ON "pitch_permissions"."pitch_id" = "pitches"."id" WHERE "pitch_permissions"."invest_permissions" @> 'ARRAY[5]::int[]'
PG::InvalidTextRepresentation: ERROR: malformed array literal: "ARRAY[5]::int[]"
LINE 1: ...WHERE "pitch_permissions"."invest_permissions" @> 'ARRAY[5]:...

Is here any another way to do that using squeel or could you provide support somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions