0.3.0 (2026-11-18)
Dependencies
- Requires PgRest 0.2 (
{:pgrest, "~> 0.2.0"}). PgRest 0.2 removedPgRest.Parser,PgRest.FilterandPgRest.TypeCaster; LiveFilter now parses operator values withPgRest.Grammar.Filter.parse_condition/2and applies filters withPgRest.Ecto.Filter.where/3. - Updated for PgRest 0.2's
ecto_sql ~> 3.14requirement: ecto 3.14.3, ecto_sql 3.14.0, postgrex 0.22.4, db_connection 2.10.2, decimal 3.2.0, doctor 0.23.0, plug 1.20.4, plug_crypto 2.2.1, telemetry 1.4.3.
Changed
LiveFilter.QueryBuilder.apply/3skips a filter it cannot apply: withschema:, a value the field type cannot cast (22P02, e.g.?qty=gt.lots) or a field that is not a schema field (42703). The other filters still apply, so a hand-edited URL no longer crashes the LiveView; 0.1 passed an uncastable value through and the query raised in the repo.- Added
apply_with_errors/3, which also returns the skipped filters as{filter, %PgRest.Error{}}, andapply!/3/apply_raw!/3, which raise the firstPgRest.Errorinstead. LiveFilter.QueryBuilder.apply_raw/3casts values with the query's schema even withoutschema:, skips a param with an unknown field or an uncastable value, and needsallowed_fields:on a schemaless source ("tasks"); it raisesArgumentErrorwithout it. Field names are no longer converted to atoms.apply_raw/3applies negated filters (not.eq.x,not.in.(a,b),not.is.null) and quoted list values (in.("a,b",c)); 0.1 skipped negations.- URL parsing (
LiveFilter.Params.Parser) mapsnot.in.(...)to:not_in,not.eqto:neq,not.neqto:eqandnot.is.null/not.is.not_nullto:is_null. Other negations andany/allmodifiers still fall back to the config's default operator.inlists honour quoted values. - A URL value with an operator prefix that the PostgREST grammar rejects (
?enabled=is.maybe,?status=in.abc) is skipped instead of falling back to the default operator with the raw string.Parser.from_params_with_errors/2andQueryBuilder.apply_with_errors/3(with a param map) report it with itsPGRST100. ftsfilters bind the query text and no longer default to theenglishconfig: without an explicit config (fts(english).cats) Postgres usesdefault_text_search_config. An explicit config is kept as{config, query}in the filter value.:not_infilters are applied throughPgRest.Ecto.Filteras a negatedin, soschema:casts their values too. The SQL is unchanged (NOT (col = ANY($1))).LiveFilter.Pagination.start_item/1andend_item/1return 0 when the total count is known and the page holds no rows;start_item/1returned 1 for an empty result andoffset + 1past the end, so?offset=999over 3 rows read "Showing 1000 to 3 of 3".- Added
LiveFilter.Pagination.past_end?/1. When the offset is past the last row,LiveFilter.Paginatorshows "No results on this page" with a "Go to first page" button instead of a range. An empty result still shows "No results". LiveFilter.Paginator's per-page form and select take their ids from the component id (<id>-limit-form,<id>-limit), so LiveView can recover the form after a reconnect and two paginators on one page no longer shareid="limit-select".LiveFilter.Bar's command-mode number/text value forms and inline editor form have ids (filter-value-form-<filter id>,filter-editor-<filter id>), matching the existingalways-on-<filter id>form, so LiveView can recover them.