{"id":29028537,"url":"https://github.com/timonweb/elixir-list-query","last_synced_at":"2025-07-19T10:34:45.889Z","repository":{"id":300941050,"uuid":"1007670788","full_name":"timonweb/elixir-list-query","owner":"timonweb","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-24T11:06:03.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T11:41:58.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timonweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T10:55:04.000Z","updated_at":"2025-06-24T11:06:06.000Z","dependencies_parsed_at":"2025-06-24T11:42:00.561Z","dependency_job_id":"605fd171-22ac-4815-bc09-aab13f8a1357","html_url":"https://github.com/timonweb/elixir-list-query","commit_stats":null,"previous_names":["timonweb/elixir-list-query"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timonweb/elixir-list-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Felixir-list-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Felixir-list-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Felixir-list-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Felixir-list-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timonweb","download_url":"https://codeload.github.com/timonweb/elixir-list-query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Felixir-list-query/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262022996,"owners_count":23246426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T07:34:37.632Z","updated_at":"2025-06-26T07:34:57.075Z","avatar_url":"https://github.com/timonweb.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elixir ListQuery\n\n**ListQuery** is a lightweight Elixir library designed to make building dynamic [Ecto](https://hexdocs.pm/ecto/Ecto.html) queries from API parameters simple and flexible.\n\nEcto’s query API is powerful, but constructing dynamic queries based on user input or API parameters can quickly become verbose and repetitive. **ListQuery** lets you transform provided params and options directly into Ecto-compatible queries, making your controllers and data-loading functions much cleaner.\n\nWith **ListQuery**, you can:\n- Seamlessly convert user params into dynamic Ecto queries.\n- Reuse a consistent querying pattern across multiple controllers or contexts.\n\n\u003e **Note:** If you’re exposing this pattern in an environment where you don’t trust all input, make sure to sanitize params to avoid leaking sensitive data or exposing unwanted query capabilities.\n\n---\n\n## Minimal Usage Example\n\n```elixir\n# Example: Fetching records with dynamic filters\n\ndef all_cycles(params \\\\ %{}, opts \\\\ []) do\n  query = ListQuery.get_query(Cycle, params, opts)\n  Repo.all(query)\nend\n\n# Usage:\nall_cycles(%{\"active\" =\u003e \"true\", \"owner_id\" =\u003e \"123\"})\n```\n\nJust pass your params map (for example, from query params or a controller) and any options. ListQuery turns them into an Ecto query ready for use with your Repo.\n\n## Attribution\n\nThis library is extracted from [`okr_app_pub`](https://github.com/sb8244/okr_app_pub/blob/master/lib/okr_app/query/list_query.ex), originally written by [Stephen Bussey](https://github.com/sb8244).  \nAll credit for the original implementation and idea goes to Stephen.  \nIf you use or modify this code, please provide appropriate attribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonweb%2Felixir-list-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimonweb%2Felixir-list-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonweb%2Felixir-list-query/lists"}