{"repo":"matthewmcgarvey/focus","free":true,"listed":false,"github":"https://github.com/matthewmcgarvey/focus","clone":"git clone https://github.com/matthewmcgarvey/focus.git","description":"Crystal SQL query builder","language":"Crystal","stars":23,"topics":["crystal","orm"],"license":"MIT","category":"databases-storage","readme_excerpt":"Focus SQL query builder for multiple databases. Heavily inspired by Kotlin's Ktorm and Golang's Jet. Do you want to learn an ORM or do you want to be able to focus? Not ready for production, yet. Goals Create an easy to understand library I don't want this library to take 10 months to feel like you know how to do everything. I want it to be made in a way that's not only easy to use, but easy to dig into internally. That means two things: 1. This will feel and look like regular SQL 2. There will be minimal or no macros Separate data models from database tables This will probably be the most unusual goal of this project. The vast majority of ORMs have you define your data model and equate that to a table in the database. When you create a User model, it wraps the users table in the database and that class is how you fetch and manipulate data. So why change that? Well, from my experience in Crystal over the past few years, maintaining that style fundamentally limits the database queries that can be safely constructed (or else they provide a backdoor way to do it that feels like you're subverting the whole point of the ORM) and places quite a burden on the maintainers of the project to add increasing complexity to manage the codebase and add more and more features. We've spent enough time trying to copy ActiveRecord, and it's just not going to be possible to provide the same flexibility that it does. So I'm trying a different path. One where you define your table completely separ","default_branch":null,"files":null,"tree":[],"storefront":"/r/matthewmcgarvey","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/matthewmcgarvey/focus/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."}