[Accelerated Tables] fetch_only Questions

This is completely untested, but here is the most concise version I could come up with:

from anvil.tables import app_tables
from anvil.tables import query as q

def q_fetch_none_of(table, column_names_list):
  table = getattr(app_tables, table) if isinstance(table, str) else table
  for row in table.search(q.page_size(1)):
      column_names_list = [x for x in dict(row) if x not in column_names_list]
      break
  return q.fetch_only(*column_names_list)

2 Likes