On Saturday, July 11, 2015 at 10:21:53 AM UTC-7, Tiger Nassau wrote:
>
> On Saturday, July 11, 2015 at 10:53:40 AM UTC-6, Jeremy Evans wrote:
>>
>> One of your queries is for the users table, the other is for the signups
>> table, maybe that is the difference?
>>
>> Try using the pg_json_ops extension, it makes queries like this easier.
>>
>> Thanks,
>> Jeremy
>>
>
> sorry for cut and paste confusion from different machines - it wasn't the
> problem.
>
> how does the pg_json_opts extension work ? we added the extension but
> didn't see any examples on how to use it specifically. Can you add a brief
> example ?
>
Sequel.extension :pg_json_ops
data = Sequel.pg_jsonb(:data)
DB[:signups].where(data.contains('email'=>email)).all
our fallback is to just go back to using pure relation tables and sequel
> orm schema but would like to give jsonb a last go
>
Note that you should not use jsonb as a replacement for pure relation
tables. If you have relational data, use real columns. jsonb should
generally be used for schemaless or semi-structured data. The great thing
about PostgreSQL is you get the best of both worlds. Relational data for
most things, but still the ability to use schemaless data easily when you
need flexibility that the standard relational model does not support.
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.