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

Support for PostgreSQL arrays #413

Open
rapides opened this issue Feb 10, 2016 · 0 comments
Open

Support for PostgreSQL arrays #413

rapides opened this issue Feb 10, 2016 · 0 comments

Comments

@rapides
Copy link

rapides commented Feb 10, 2016

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?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant