rcdilorenzo/filtrex
63.0
Adequate · 18 September 2026
997
lines of production code
Elixir
primary language
1
measurement over time
What this system is
Filtrex is an Elixir library that parses filter expressions and generates Ecto query expressions for database filtering. It supports a modular condition system for text, date, datetime, number, and boolean types, allowing users to apply structured filters to Ecto queries. The library handles parameter parsing, AST building, and safe query generation, including fixes for ambiguous column errors in joined tables.
Features
Added sample models migration for testing
A new database migration has been added to create a 'sample\_models' table. This table includes columns for title, date, datetime, upvotes, rating, and comments, along with standard timestamps, providing a schema for testing various data types within the application.
priv · high confidence
Initial release of Filtrex library
This commit introduces the Filtrex library, providing a system for parsing filter expressions and generating Ecto query expressions. It includes core modules for handling filter parsing (\Filtrex\), condition delegation (\Filtrex.Condition\), parameter parsing (\Filtrex.Params\), and AST building (\Filtrex.AST\). Users can now parse filter maps or Plug-decoded params into structured filter objects and apply them to Ecto queries, supporting features like sub-filters, configurable condition types, and safe parsing modes.
lib · high confidence
Initial release of Filtrex library with Elixir 1.19 support
This change introduces the Filtrex library, a tool for filtering database results using Ecto, by adding the initial project structure and documentation. The repository now includes a CHANGELOG starting at version 0.4.3, an MIT license, and a .tool-versions file specifying Erlang 27.3.3 and Elixir 1.19.5. The README provides comprehensive usage examples, including filtering from URL parameters, filtering across associations, and integration with Phoenix, establishing the library's core functionality for users.
(repo-wide) · high confidence
New dedicated condition types for Boolean, Date, DateTime, Number, and Text
The library now includes specific condition modules for Boolean, Date, DateTime, Number, and Text data types, replacing or supplementing generic handling. Users can now filter by boolean flags (supporting string 'true'/'false' and empty strings), precise date ranges (including 'between' and 'not between' with configurable formats via Timex), ISO 8601 datetime comparisons, and numeric values (with optional decimal support and allowed value ranges). Text filtering now explicitly supports case-insensitive 'contains' and 'does not contain' operations using SQL LIKE patterns. These changes introduce new configuration options, such as date format strings and decimal allowance, and standardize comparators to 'equals' and 'does not equal' where appropriate.
lib/filtrex/conditions · high confidence
Behavioural changes
Complete rewrite of Filtrex with new condition system and Phoenix-like params parsing
The Filtrex library has been rewritten to introduce a modular condition system (supporting text, date, datetime, boolean, and number types) and a new configuration structure via \Filtrex.Type.Config\. This change enables Phoenix-like parameter parsing, allowing users to filter using string-keyed maps with optional whitelists, and supports piping existing Ecto queries into \Filtrex.query/2\. The new architecture includes dedicated modules for AST building (\Filtrex.AST\), condition parsing (\Filtrex.Condition\), and parameter sanitization (\Filtrex.Params\), replacing the previous implementation to provide more flexible and type-safe filtering capabilities.
lib/filtrex · high confidence
Migrate configuration to Elixir 1.14+ syntax and add test environment config
The application configuration has been updated to use the modern \import Config\ syntax, replacing the deprecated \use Mix.Config\ module, which ensures compatibility with Elixir 1.14 and later versions. Additionally, a dedicated \config/test.exs\ file has been introduced to explicitly define the Ecto repository adapter (Postgres) and database credentials for the test environment, while the main \config.exs\ now conditionally imports this file only when the environment is set to \:test\.
config · high confidence
Fixes
Fix ambiguous column errors in query generation
The query encoder now explicitly references table aliases (e.g., \s.column\) when constructing SQL fragments. This prevents 'Ambiguous column' errors that occurred when querying joined tables that share column names, ensuring that field references are correctly scoped to the primary table.
lib/filtrex/utils · high confidence
Test coverage
Added test factories for condition and filter parameters; Added test support infrastructure for Filtrex; Added unit tests for boolean, date, datetime, number, and text condition parsers; Initial test suite for Filtrex.
Dependencies
Upgrade to Elixir 1.15 and Ecto 3.12 with comprehensive dependency updates
The project now requires Elixir 1.15 and upgrades its core database dependency to Ecto 3.12 (along with Ecto SQL 3.12), replacing the previous Ecto 3.0 setup. This change is accompanied by a major version bump to 0.5.0 and updates to other dependencies including Plug 1.16, Timex 3.7, and ExDoc 0.35, while adding test-only dependencies like Postgrex and Ex Machina to support the expanded test suite.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 63.
Lenses
- Code Health 100
- Architecture 69
- Maturity 52
- Readiness 65
- Security 93
Changes since last survey
- 83 commits — 78 feature/other, 5 fixes
By area
- (root) — 48 commits
- lib/filtrex — 18 commits
- (repo) — 8 commits
- lib/filtrex.ex — 5 commits
- .github/workflows — 1 commit
- docs/all.json — 1 commit
- lib/condition.ex — 1 commit
- test/conditions — 1 commit
Notable commits
- fix: Fix Ambiguous Column Errors (#46)
- fix: Fix Integer Parsing When Decimal Option Is False (#49)
- fix: Fix a couple of minor doc issues
- fix: Fix postgrex error for empty params parsing (closes #27)
- fix: Fix warnings on Elixir 1.5+ (#47)
- change: Add CI
- change: Add DateTime condition
- change: Add Elixir 1.14-1.17 compatibility (#75)
- change: Add Elixir 1.19 compatibility, tested with 1.20-rc.3 (#76)
- change: Add GitHub Actions CI for Elixir 1.13 (#73)
- change: Add Gitter badge (#37)
- change: Add MIT license file
- change: Add README example of options config (closes #15)
- change: Add basic config struct
- change: Add basic text condition
- change: Add between / not between syntax for date condition
- change: Add boolean condition
- change: Add case insensitivity for LIKE queries (#28)
- change: Add date format configuration option
- change: Add documentation
- …and 63 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rcdilorenzo/filtrex was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2b59d83f5d6d683bb068e0d77a0668b6404a7c2f — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.