Querying client_readable tables

Hi all,

Is it possible to cache only certain columns when doing a client_reabable view on a data table. For example, I would like to us q.fetch_only() when returning a client_readable view in a similar manner to how we can do this with app_tables.my_table.search(q.fetch_only(*columns_to_fetch)).

Something similar has been discussed below, but I still need the other columns to be retrievable. I don’t want to completely remove those columns from my view. So I want the link to that column to still exist, but don’t fetch the data during the initial server call for speed reasons. Only if the column is required should it be fetched.

I think you’ll like this:

I’m already using accelerated tables, but as far as I can tell (and have tested), we can’t use q.fetch_only() in a client readable call:

app_tables.my_table.client_readable(q.fetch_only(*my_columns)) returns an error.

A client readable view is still something you have to execute a search on. What happens if you use q.fetch_only on the view? e.g.

view = app_tables.my_table.client_readable()
results = view.search(q.fetch_only(*my_columns))

So maybe I left out a key bit of information. I’m using Tabulator, and I’d like to display some columns from a datatable. So I’m setting the app_table option to a client readable view of my table via a server call. Tabulator then performs it’s own search() on the table view, but as far as I can tell, I can’t limit which columns are fetched during the tabulator search. (I suspect this is why displaying the rows takes long, ± 4 seconds). Therefore, I was hoping to perform the q.fetch_only() on the table view before passing it to the tabulator app_table option.

I guess this is really a feature request then for tabulator - you should move the conversation over to a Tabulator issue/discussion point.

Issues · s-cork/Tabulator · GitHub

Agreed. Was hoping there was perhaps an anvil side solution, but seems not. I’ve moved it across. Thanks for the great work @stucork