{"repo":"rcdilorenzo/filtrex","free":true,"listed":false,"github":"https://github.com/rcdilorenzo/filtrex","clone":"git clone https://github.com/rcdilorenzo/filtrex.git","description":"A library for performing and validating complex filters from a client (e.g. smart filters)","language":"Elixir","stars":200,"topics":["filter","parsing","comparator","parsing-filters","url-parameters","ecto","database"],"license":"MIT","category":"databases-storage","readme_excerpt":"Filtrex Filtrex aims to make filtering database results with Ecto a breeze. This library attempts to help you solve problems such as... - Building database query filters from URL parameters - Establishing a readable, consistent convention for filter parameters - Validating filters do not expose unintended data or allow unauthorized access - Saving filters for later use (e.g. a smart filter feature) Check out the docs or read on for a quick start on how to use. Note that this library does not require using a web dependency such as Phoenix but is geared towards web applications. It also has only been tested with a Postgres backing but may work with other database adapters. Installation The package is available on Hex and can be installed by adding it to your list of dependencies: Outline - Example Usage - Filtering from parameters (and an example with phoenix) - Storing filters - Configuration - Filter Types Example Usage Here is a simple example of how to filter incoming parameters with filtrex: With this example, here are some of the query parameters that can be used: Example Key Example Value ------------------------------------- -------------------------------------------- comments contains Chris McCord title Upcoming Phoenix Features posted at between (nested value) start: \"01-01-2013\" end: \"12-31-2017\" filter union (any \\ all \\ none) any Filtering Across Associations Here is a more complex example for filtering across an association: Filtering From Parameters Filtering fr","default_branch":null,"files":null,"tree":[],"storefront":"/r/rcdilorenzo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rcdilorenzo/filtrex/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}