You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlalchemy
I'm not sure, but AFAIK, this type of search isn't *easily* doable in PostgreSQL. The json and jsonb operators and functions are really targeting "object literals" style data, not lists.
In the past, I think one could search against the column like text and match/regex out a list value like `"user1"` - but that didn't work right.
This type of search is possible with advanced PostgreSQL queries, by using the functions like json_array_elements on a field and joining against that. That's really not within the scope of SQLAlchemy or this list though, and you'll have better luck search (or asking) on Stack Overflow. There are a handful of questions and solutions there on this topic.
Once you can figure out the PostgreSQL queries to accomplish what you want, this list can help you convert it to SQLAlchemy if you have trouble.
Simon King
unread,
Oct 19, 2021, 9:46:16 AM10/19/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sqlal...@googlegroups.com
For what it's worth, I think the "?" operator would work for this with
JSONB, but not with JSON: