that style of PG function use isn't directly supported yet and there is
a recipe to achieve this at
https://bitbucket.org/zzzeek/sqlalchemy/issues/3566/figure-out-how-to-support-all-of-pgs#comment-22842678
On 01/21/2016 09:10 AM, Sami Pietilä wrote:
> Sounds good. I was able to write following sql sentense, but I could not
> figure out how to refer to 'value' (which is created by the
> jsonb_array_elements_text) named column in where().
>
> sql_sentense = select([database.tables['jtable'],
> 'value']).select_from(func.jsonb_array_elements_text(database.tables['jtable'].c['data'])).where('value'.contains('firs'))
>
> Are there somewhere examples from
> sqlalchemy func.jsonb_array_elements_text usage? I also tried to call
> func.lower(func.jsonb_array_elements_text(..)) to make 'value' column
> values as lower case, but it did not seem to work.
>
>
> keskiviikko 20. tammikuuta 2016 20.38.35 UTC+2 Michael Bayer kirjoitti:
>
> you can use that, that's func.jsonb_array_elements_text(column)
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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 https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.