{"repo":"crystal-garage/lustra","free":true,"listed":false,"github":"https://github.com/crystal-garage/lustra","clone":"git clone https://github.com/crystal-garage/lustra.git","description":"Advanced ORM between PostgreSQL and Crystal","language":"Crystal","stars":26,"topics":["crystal","orm","postgresql","postgres","hacktoberfest","geometry"],"license":"MIT","category":"databases-storage","readme_excerpt":"Lustra Lustra is a PostgreSQL-focused ORM and SQL builder for Crystal. It provides an Active Record style model layer, expressive query collections, migrations, associations, validations, lifecycle callbacks, and direct access to PostgreSQL features such as JSONB, arrays, CTEs, cursors, full-text search, enums, UUIDs, and geometric types. Lustra started as a fork of Clear at version 0.8 and has since evolved as an independent project. Why Lustra? Use Lustra when you want: - PostgreSQL-first behavior instead of database-agnostic lowest-common-denominator APIs - readable Active Record style models for application code - a composable SQL builder for lower-level queries - typed Crystal model fields with explicit nilability - associations, eager loading, scopes, callbacks, validations, and migrations - PostgreSQL-specific querying for JSONB, arrays, full-text search, CTEs, and more Lustra is PostgreSQL-only. It is not designed for MySQL, MariaDB, or SQLite. Installation Add Lustra to shards.yml : Require it in your application: Initialize the database connection: For production applications, configure the connection pool explicitly: Tune max pool size per running process and keep the total below PostgreSQL's max connections . Quick Start Define a model: Create the table with a migration: Create, query, and update records: Querying Lustra queries are model collections. They are chainable and execute when you use terminal helpers such as each , to a , first , count , or exists? . As","default_branch":null,"files":null,"tree":[],"storefront":"/r/crystal-garage","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/crystal-garage/lustra/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."}