FatEcto.Dynamics.FatBuildableHelper (FatEcto v1.1.0)
View SourceProvides helper functions for filtering and processing query parameters in FatEcto.Dynamics.FatBuildable
.
Summary
Functions
Filters fields based on the filterable_fields
configuration.
Removes fields with ignoreable values from the query parameters.
Functions
Filters fields based on the filterable_fields
configuration.
Parameters
where_params
: The query parameters (e.g.,%{"field" => %{"$EQUAL" => "value"}}
).filterable_fields
: A map of fields and their allowed operators (e.g.,%{"email" => ["$EQUAL", "$LIKE"]}
).
Returns
- The filtered query parameters.
Removes fields with ignoreable values from the query parameters.
Parameters
where_params
: The query parameters (e.g.,%{"field" => %{"$EQUAL" => "value"}}
).ignoreable_fields_values
: A map of fields and their ignoreable values (e.g.,%{"email" => ["%%", "", [], nil]}
).
Returns
- The filtered query parameters.