{"repo":"solnic/drops_relation","free":true,"listed":false,"github":"https://github.com/solnic/drops_relation","clone":"git clone https://github.com/solnic/drops_relation.git","description":"🔋-included relation abstraction on top of Ecto with schema inference and composable query API + more ✨","language":"Elixir","stars":46,"topics":["databases","ecto","ecto-sql","elixir","elixir-lang","postgresql","sqlite"],"license":null,"category":"databases-storage","readme_excerpt":"Drops.Relation High-level API for defining database relations with automatic schema inference and composable queries. Drops.Relation automatically introspects database tables, generates Ecto schemas, and provides a convenient query API that feels like working directly with Ecto.Repo while adding powerful composition features. Installation Add drops relation to your list of dependencies in mix.exs : Then run installation task: Configuration Configure Drops.Relation in your application config: Quick Start Automatic Schemas Drops.Relation automatically introspects your database tables and generates Ecto schemas: You can also define schemas manually or customize inferred ones: Relation Query API Drops.Relation provides all the familiar Ecto.Repo functions: Composable Queries Chain operations together for powerful query composition: Available Operations - restrict/2 - Add WHERE conditions (supports lists for IN queries) - order/2 - Add ORDER BY clauses (supports atoms, lists, and tuples) - preload/2 - Preload associations - Auto-generated finders like get by email/1 , get by name/1 based on indices Custom Queries Define reusable query functions with the defquery macro: Query Composition Custom queries are fully composable with built-in operations: The relation() function inside defquery blocks returns the relation module, allowing you to reference the current relation in your Ecto queries. Advanced Query Composition For complex query logic involving multiple conditions and boolean","default_branch":null,"files":null,"tree":[],"storefront":"/r/solnic","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/solnic/drops_relation/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."}