-
Notifications
You must be signed in to change notification settings - Fork 22
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
Relation#sort should sort on all attributes in the header #58
Comments
I should maybe clarify a bit. It seems like |
@snusnu can you work out a minimal test case that demonstrates the problem? This sounds like a bug and is not at all what was intended. |
@dkubb seems like the following change to diff --git a/lib/axiom/relation/gateway.rb b/lib/axiom/relation/gateway.rb
index 7274cc3..27d0430 100644
--- a/lib/axiom/relation/gateway.rb
+++ b/lib/axiom/relation/gateway.rb
@@ -10,7 +10,7 @@ module Axiom
# remove methods so they can be proxied
undef_method(*DECORATED_CLASS.public_instance_methods(false).map(&:to_s) - %w[materialize])
- undef_method(:project, :remove, :extend, :rename, :restrict, :sort_by, :reverse, :drop, :take)
+ undef_method(:project, :remove, :extend, :rename, :restrict, :sort, :sort_by, :reverse, :drop, :take)
# The adapter the gateway will use to fetch results
# |
@dkubb anything i can do to further help with this one? |
I was under the impression that the issue title describes the expected behavior. However, when i do
some_base_relation_gateway.sort.drop(1).take(1)
, neitherORDER BY
norOFFSET/LIMIT
clauses get pushed down to the underlying (postgres) adapter. The result being that the operations are ("silently") handled in memory, while performing (potentially) slow queries.The text was updated successfully, but these errors were encountered: