-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide implicit to query case class companion objects directly #73
Conversation
Related issue: #24 |
Current coverage is
|
I also don't think this should be exposed through |
Ha, ha, keep in mind that Slick, the library Quill is competing with for mindshare, has a "few" more implicit conversions than 22 last I checked ;-) Let's ask a question: in the end what is Just for fun, strip out the
Add in
and that's the relatively simple case! Queries involving 10+ tables, those Given the early stage of the project I'd say make implicit conversions the default now and not require users to explicitly import the conversion. Much cleaner solution all around, IMO. |
I can't say that I consider Slick a good example in API design. :)
It also provides table and column name mapping: val people = quote(query[Person]("people", _.name -> "person_name"))
This doesn't seem better than what Quill already provides. For instance, if I'm not mistaken, |
You can get that right now by defining a schema object as described in the docs. And with this merged in you would be able to get that with just one extra import statement. On the other hand, if this conversion was enabled by the default, imagine trying to use quill with some other library that decided having default implicit conversions from case classes was a good idea. |
I have a concern about to there are differents ways to do the same thing, usually that give alot of doubts to who will use it. |
daf5fa9
to
84df189
Compare
84df189
to
742d0b7
Compare
I've decided to keep it as a separate import ( |
provide implicit to query case class companion objects directly
@mariusmuja @rfranco, I'd like to get your opinion on this if you have some time.
This change allows the user to query case class companions directly through an implicit conversion:
Produces the same query as:
io.getquill._
, I would like to avoid exposing so many implicit conversions.