Query operators for Simple Object columns

Are there any query operators that can be used with Simple Object columns?

I tried both the following, but neither works:

app_tables.my_table.search(my_column=q.not_({}))
app_tables.my_table.search(my_column=q.not_('{}'))

I haven’t used them myself, but there is an introduction to the topic here: Anvil Docs | Using Data Tables from Python . The link therein (i.e.,

the Postgres JSON containment rules

) looks especially intriguing.

1 Like

Unfortunately I need to find all the elements with a non empty dictionary, and it looks like this case is not covered.

1 Like

That’s right – we don’t currently have an “exact match” operator for Simple Object columns. Can you post it to Feature Requests for us?

I’m going to decline your request for feature request because:

  • In these case I added one column, which is often the right thing to do when you think you need to do queries on Simple Object columns
  • I will keep my feature request allotment for when I really need something (I kind of think they are too cheap :wink:)

@stefano.menci and @meredydd There is a FR here that requests testing for exact matches of simple objects: