Skip to content
CAI
Software that uses CAICheck a score

woylie/flop

72.8

Strong · 3 October 2026

9.1k

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Flop is an Elixir library that provides filtering, ordering, and pagination capabilities for Ecto queries. It supports multiple pagination strategies, including cursor-based navigation, and allows for complex field definitions such as custom, compound, and join fields. The system features an adapter-based architecture that ensures database compatibility across PostgreSQL, MySQL, and SQLite through dialect-specific query adaptation.

How it got here

2019 — Flop library initial release and architecture

7 changes.

This period marks the initial release of the Flop library, introducing core functionality for Ecto filtering, ordering, and pagination. The work established an adapter-based architecture to support extensibility beyond Ecto and added cursor-based pagination alongside various new filter operators and custom Ecto types. Concurrently, the project upgraded its dependencies and expanded its test infrastructure to validate these new features across multiple database adapters.

2020–2026 — Ecto adapter implementation and testing

11 changes.

This period focused on implementing the Ecto adapter to support custom fields, complex queries, and database-specific dialects for MySQL, PostgreSQL, and SQLite. Extensive test coverage was added to validate adapter functionality, cursor pagination, and configuration across all supported databases. Documentation cheat sheets were also introduced to guide users on backend and schema configuration.

Features

Add custom Ecto types for flexible filter value casting

New custom Ecto types (\Any\, \ExistingAtom\, and \Like\) have been added to the \lib/flop/custom\_types\ directory to improve how filter values are validated and cast. The \Any\ type allows values to pass through unchanged, \ExistingAtom\ safely converts binary strings to existing atoms, and the \Like\ type supports casting values for \ilike\ and \like\ operators as either a single string or a list of strings, enhancing the flexibility of filter inputs.

_lib/flop/custom\types · high confidence

Initial release of Flop for Ecto filtering, ordering, and pagination

This change introduces the Flop library, a helper for filtering, ordering, and paginating Ecto queries. It provides a \use Flop\ macro for creating config modules with default options, schema-level validation via \Flop.Schema\, and core functions like \validate\_and\_run/3\ to execute queries with parameters. The library supports page-based, offset-based, and cursor-based pagination, along with configurable global and schema-specific options for limits, filters, and sorting.

lib · high confidence

Introduce Ecto adapter for custom field support

The Ecto adapter has been implemented to enable filtering, sorting, and cursor pagination on custom, compound, and join fields. This change allows users to define custom fields with specific Ecto types and operators, supporting complex queries that were previously unavailable or required workarounds.

lib/flop/adapter · high confidence

Introduces adapter-based architecture and cursor-based pagination

Flop now supports cursor-based pagination (via \:first\/\:after\ and \:last\/\:before\) alongside existing offset and page methods, enabling efficient navigation for large datasets. The library introduces a new \Flop.Adapter\ behaviour to decouple query building from specific data sources, allowing for extensibility beyond Ecto. This change also adds new filter operators (\:empty\, \:not\_empty\, \:contains\, \:not\_contains\, \:starts\_with\, \:ends\_with\, and \like/ilike\ variants), support for custom, join, and compound fields, and stricter configuration validation using NimbleOptions.

lib/flop · high confidence

New backend and schema configuration cheat sheets for Flop

Added two new documentation cheat sheets in the guides/cheatsheets directory: 'backend.cheatmd' and 'schema.cheatmd'. The backend guide details how to configure the Flop backend module, including application environment settings, pagination options, feature toggles (filtering, ordering, pagination), and Ecto adapter configurations. The schema guide explains how to configure Flop options directly on Ecto schemas using @flop\_options, covering basics, limit/ordering settings, alias fields, compound fields, and join fields.

guides/cheatsheets · high confidence

Behavioural changes

Credo configuration updated to use elixir\_baseline preset

The project's Credo linting configuration has been replaced with a minimal file generated by the \elixir\_baseline\ preset. This change shifts the linting strategy to inherit Credo's default checks, allowing new checks to be applied automatically during Credo upgrades, while explicitly enabling specific readability and refactoring checks (such as \BlockPipe\ and \StrictModuleLayout\) via the \extra\ configuration.

(repo-wide) · high confidence

Improved database compatibility and new string filtering options

The Ecto adapter now includes a dialect system that automatically adapts queries for database-specific limitations, such as falling back from ILIKE to LIKE for MySQL and SQLite, emulating NULLS FIRST/LAST ordering for MySQL, and using JSON functions for array queries in MySQL. Additionally, new filtering operators (starts\_with and ends\_with) are now supported, and cursor pagination on nullable columns has been fixed to work correctly.

lib/flop/adapter/ecto · high confidence

Initial configuration setup for test environment

The application now includes a structured configuration setup with a base config file that loads environment-specific settings. Specifically, the test environment configuration has been defined to set up Ecto repositories for the Flop library, enable diagnostics, configure StreamData properties (adjusting max runs and run time based on CI environment variables), and set the logger level to warning.

config · high confidence

Test coverage

Add MySQL adapter test infrastructure; Add SQLite adapter integration tests; Added PostgreSQL adapter test infrastructure; Added comprehensive test coverage for Flop validation, cursor handling, and schema configuration; Added integration tests for Ecto adapter ordering and custom fields; Added test coverage for Flop validation and custom types; Added tests for Ecto dialect handling and cursor pagination; Expanded test support schemas and utilities for advanced filtering and custom fields; Removed legacy FlopTest module.

Dependencies

Major dependency upgrade and expanded test infrastructure

This release upgrades core dependencies to modern versions, including Ecto to \~\> 3.11, Postgrex to 0.22.4, and Credo to 1.7.19, while adding support for MySQL (via MyXQL) and SQLite (via Ecto SQLite3) in the test suite. The project now requires Elixir 1.11+, introduces new aliases for running tests against specific database adapters, and adds documentation tooling like Makeup Diff for better code highlighting in guides.

(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

Score

  • CAI 73 → 73 (-0.4)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (+0.0)
  • Architecture 90 → 92 (+2.5)
  • Maturity 59 → 59 (+0.0)
  • Readiness 78 → 75 (-2.8)
  • Security 99 → 99 (+0.2)

Resolved (1)

  • Documentation: no installation or build instructions (README.md)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

woylie/flop 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ccf35ab223b8ed247f636a105872ee8c3ee0e042 — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.