{"id":19027635,"url":"https://github.com/danielefongo/queryable","last_synced_at":"2025-04-23T14:48:46.039Z","repository":{"id":57538690,"uuid":"345354621","full_name":"danielefongo/queryable","owner":"danielefongo","description":"Enhance Ecto with powerful queries.","archived":false,"fork":false,"pushed_at":"2021-03-09T13:05:24.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T00:57:03.025Z","etag":null,"topics":["criteria","ecto","elixir","query"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielefongo.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}},"created_at":"2021-03-07T13:31:57.000Z","updated_at":"2021-06-02T20:56:25.000Z","dependencies_parsed_at":"2022-09-19T07:30:40.083Z","dependency_job_id":null,"html_url":"https://github.com/danielefongo/queryable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielefongo%2Fqueryable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielefongo%2Fqueryable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielefongo%2Fqueryable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielefongo%2Fqueryable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielefongo","download_url":"https://codeload.github.com/danielefongo/queryable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250456909,"owners_count":21433722,"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":["criteria","ecto","elixir","query"],"created_at":"2024-11-08T21:08:46.241Z","updated_at":"2025-04-23T14:48:46.022Z","avatar_url":"https://github.com/danielefongo.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Queryable\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/danielefongo/queryable/ci)\n![Coveralls](https://img.shields.io/coveralls/github/danielefongo/queryable)\n[![Hex pm](http://img.shields.io/hexpm/v/queryable.svg?style=flat)](https://hex.pm/packages/queryable)\n![Hex.pm](https://img.shields.io/hexpm/l/queryable)\n\nEnhance Ecto with powerful queries.\n\n## Installation\n\nThe package can be installed by adding `queryable` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:queryable, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Documentation\n\nDocumentation can be found at [https://hexdocs.pm/queryable](https://hexdocs.pm/queryable).\n\n## Usage\n\nExtend an Ecto Schema by adding criteria:\n\n``` elixir\ndefmodule Person do\n  use Queryable #instead of Ecto.Schema\n\n  schema \"persons\" do\n    field :name, :string\n    field :surname, :string\n    field :age, :integer\n  end\n\n  criteria(under: age, where: el.age \u003c ^age)\n  criteria(ordered_by: field, order_by: ^field)\nend\n```\n\nThen create an Ecto Query in one of the following modes:\n\n``` elixir\nPerson.query(name: \"John\", under: 18)\n```\n\n``` elixir\nPerson.name(\"John\") |\u003e Person.under(18)\n```\n\nThis query can then be passed to methods like `Repo.all`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielefongo%2Fqueryable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielefongo%2Fqueryable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielefongo%2Fqueryable/lists"}