-
Notifications
You must be signed in to change notification settings - Fork 51
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
Missing constructs #73
Comments
Includes, preload, and eager_load were intentionally excluded. I don't see how baby squeel would actually add any value to those methods, since they just take symbols anyway. But, you're right about |
Well, squeel's preload and co. would also take stubs as arguments, so I could write: preload{assignments.students.user_role}. Not a big difference, but a little shorter and more uniform with the rest of the constructs. |
I'm going to add this to compatibility mode, but, I don't think there needs to be a DSL just for the sake of having a DSL. |
What about the reorder? And btw there's also a rewhere. Thanks. |
Whoops! Forgot about that one! I'll add it. |
I don't understand the reasoning for not adding
which translates in AR to:
I think the AR equivalent is definitely less clear, and I can't even keep the original order, I get a syntax error (sure order doesn't matter for the program, but it can matter for the programmer). Besides that, there's a matter of language consistency. In a chain of baby_squeel calls using one syntax I have to go back and use AR syntax just because some constructs are missing. That's ugly. It would be great if baby_squeel provided a full set of equivalents to all AR query functions. Thanks. |
I don't think there's anything wrong with encouraging people to use AR for includes. Using That being said, this feature isn't that hard to support, so I'll add it. |
Sounds great, thanks. And since we're at it, it would also be nice to have back the operator aliases ( |
I'm trying to translate from squeel, I couldn't find the equivalent of a few constructs: reorder, preload, includes, eager_load. Have they been implemented? Thanks.
The text was updated successfully, but these errors were encountered: