this is more of a "what SQL will work on Postgresql" question, I'd ask
on StackOverflow or the PG list just in terms of the SQL query to use.
Once you get a string SQL query that works we can do it through SQLAlchemy.


On 01/20/2016 07:44 AM, Sami Pietilä wrote:
> The generated SQL does not seem to be able to return any items. The
> generated SQL looks like this.
> 
> Section: baserecords, Column name: first_names
> SELECT baserecords._id
> FROM baserecords
> WHERE (lower(CAST(baserecords.last_names AS CHAR)) LIKE '%%' || :lower_1
> || '%%')
> 
> I think casting JSONB column to CHAR does something different than
> expected. I am not sure, if postgres compares anymore with JSONB list
> items. With original example table jtable I tried following query and it
> returned following results.
> select CAST(jtable.data AS CHAR) from jtable;
>  data
> ------
>  [
>  [
> (2 rows)
> 
> -- 
> 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 sqlalchemy+unsubscr...@googlegroups.com
> <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
> To post to this group, send email to sqlalchemy@googlegroups.com
> <mailto:sqlalchemy@googlegroups.com>.
> 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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to