"<set..." is the string representation of a DAL Set object.

Can you show your exact code? Here's what I get:

>>> db('j->>"x" = 1')._select(db.j.id)
'SELECT "j"."id" FROM "j" WHERE j->>"x" = 1;'

Anthony

On Thursday, May 31, 2018 at 5:01:08 PM UTC-4, mweissen wrote:
>
> Let's say I have a table like
> db.define_table("mytable", Field("j", "json"))
> with some data like db.mytable.insert(j={"x":1})
>
> Now I want to find all records with x==1.
> Of course
> db(db.mytable.j["x"]==1)
> does not work (but it would be fine).
>
> I have tried some queries like
> db.mytable.j.like("%1%")
> db('(j-->x)=1')
>
> but nothing did work. web2py creates always a sql-statement with
> .... WHERE <Set(j-->X)=1>...
>
> Postgresql does not understand <set - there is an error message
> syntax error at or near "<" Where does this "<set..>" come from?
> Any ideas?
>
> Regards, Martin
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to