onyxframework / sql

A delightful SQL ORM ☺️
https://api.onyxframework.com/sql
MIT License
91 stars 7 forks source link

Remove Repository#query_one #47

Closed vladfaust closed 6 years ago

vladfaust commented 6 years ago

repo.query(User.where(id: 42)).first? vs repo.query_one?(User.where(id: 42))

This underscore is ugly. It may also confuse with an idea that _one somehow affects the query (e.g. automatically limiting it to 1), which is false.

eliasjpr commented 6 years ago

I like the first approach repo.query(User.where(id: 42)).first? :+1: more OOP and intuitive

vladfaust commented 6 years ago

Closed by 226b92c3ff82403e52a719369569e68a88a6b814