sql
sql copied to clipboard
A delightful SQL ORM ☺️
```crystal post = Post.where(id: 1).join(:author) { |x| x.select(:id, :name) } pp post # ``` Should work without `:id`.
Would build to `WHERE field > a AND field < b`. Should raise if the type is neither `Number` nor `Time`.
```crystal class Article schema articles do type tags : Array(Tag), through: TagRelation, foreign_key: "article_id" end end class Tag schema tags do type value : String type articles : Array(Article), through:...
Either change the error message from `Cannot append empty INSERT values. Ensure to call #insert before. Or if you want to insert all columns default, use 'INSERT INTO table DEFAULT...