The in-memory engine: sort, filter and paginate a plain list of maps or
structs against a PetalComponents.DataTable.State.
This is the zero-setup path - the registry examples, the playground and any app with an already-loaded list get a working table with no database and no extra dependency. It is deliberately a toy for data that fits in memory; real query backends (Ecto/Flop adapters, cursor pagination) are the production wiring layer, not this module.
{rows, state} = Engine.List.run(all_rows, state)returns the visible page plus the state with total filled in (the
post-filter count), which is what the footer and pagination render from.
Filter semantics by operator - all string comparisons are
case-insensitive, nil field values never match:
Summary
Functions
Runs the full pipeline: search -> filter -> sort -> count -> paginate.
Functions
Runs the full pipeline: search -> filter -> sort -> count -> paginate.
Options:
:search_fields- the fields the quick-search term matches against (case-insensitive contains). Defaults to every field of the FIRST row whose value is a string - which means the default set depends on that row's data: a text column that is nil in row one is silently excluded, and a loaded UUID column is silently included. Fine for a demo; pass:search_fieldsexplicitly in anything real.