Action's query
# avo-2
f
👋 I'm making an action - I'd like to stream a CSV to the client to avoid loading all records in memory. Can I get access to the query object for the current view's records, including any applicable filters?
Copy code
class MyAction < Avo::BaseAction
  def handle(models:, resource:, fields:, **)
The
models
argument here appears to be an array of the records I've selected on the frontend - in production, this can be hundreds of thousands of records here. Thanks in advance 🙂
l
Hi @fancy-crowd-87619 👋 You're right, right now we're passing an array of records. That array normally is not that big unless you use the select all feature and you have many records on that table. We will consider to pass the query instead. How long (approximately) does an simple action takes to run on a table that big on all records in production?