aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-15 18:37:47 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-15 18:37:47 -0700
commit7f01134d1bdca70dcc9b16cf433894e7c8236815 (patch)
tree8548b9763699555675421fb4400cac4efb889621
parentcd9efb9eec6198f08b4fd5d754a33aa1b1669b37 (diff)
downloadrails-7f01134d1bdca70dcc9b16cf433894e7c8236815.tar.gz
rails-7f01134d1bdca70dcc9b16cf433894e7c8236815.tar.bz2
rails-7f01134d1bdca70dcc9b16cf433894e7c8236815.zip
js/nk - fixed hashing
-rw-r--r--TODO10
-rw-r--r--lib/active_relation/relations/compound.rb2
-rw-r--r--lib/active_relation/relations/relation.rb6
3 files changed, 11 insertions, 7 deletions
diff --git a/TODO b/TODO
index fb656ef084..c7ff84fe28 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,6 @@
todo:
-- clean up integration tests in join - i find the aggregate stuff too integrationy; unit testing would be better
+- try to make aggration testing in join spec to be a bit more unit-like
+- finish pending tests
- test relation, table reset
- cache expiry on write
- rewrite of querycache test in light of this
@@ -7,11 +8,11 @@ todo:
- descend on array, along with bind written in terms of it
- standardize quoting
- use strings everywhere, not symbols ?
-- rename sql strategies
-- test sql strategies
- - the parallel names are confusing since it's not obvious what's what. plus, we lack unit tests; the biggest complaint is a lack of clarity concerning what purpose these serve in the system. Unit tests wont illustrate much unless we use concrete examples.
+- "unit" test sql strategies
+ - use real world examples, so they should be like a tutorial.
- rename the tion (Selection) classes so that words that don't end in tion don't seem inconsistent
- re-evaluate bind
+- mock out database
done:
. Relation <=> Relation -> InnerJoinOperation
@@ -47,3 +48,4 @@ done:
- session just calls execute, passing in a connection; by default it gets a connection from the relation.
- #strategy is now on value, attribute and relation; you must admit it's name is confusing given that e.g., relation already has a strategy (Sql::Relation) ... should it be called predicate strategy? operand1.to_sql(operand2.predicate) maybe prefer operand1.cast(operand2) or project or in light of
- renamed to #format: operand1.format(operand2)
+- rename sql strategies
diff --git a/lib/active_relation/relations/compound.rb b/lib/active_relation/relations/compound.rb
index fac0939c6f..04f8ed5a2f 100644
--- a/lib/active_relation/relations/compound.rb
+++ b/lib/active_relation/relations/compound.rb
@@ -16,4 +16,4 @@ module ActiveRelation
descend(&:qualify)
end
end
-end \ No newline at end of file
+end
diff --git a/lib/active_relation/relations/relation.rb b/lib/active_relation/relations/relation.rb
index 15782cde06..e0fe43a0a0 100644
--- a/lib/active_relation/relations/relation.rb
+++ b/lib/active_relation/relations/relation.rb
@@ -1,7 +1,9 @@
module ActiveRelation
class Relation
- abstract :attributes, :selects, :orders, :inserts, :groupings, :joins, :limit, :offset, :alias
-
+ abstract :attributes, :selects, :orders, :inserts, :groupings, :joins, :limit, :offset, :alias, :hash
+
+ hash_on :hash
+
def session
Session.new
end