1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

- new todo items

- alias to_sql to to_s
- added column_for to join (untested)
This commit is contained in:
Nick Kallen 2008-04-19 20:40:47 -07:00
parent 86885933c4
commit 9567f8e4e8
3 changed files with 12 additions and 1 deletions

View file

@ -1,10 +1,14 @@
todo:
- active record query adapter
- audit active record quoting
- incorporate linq functionality/terminology
- then_by (ordering)
- reverse
- any/all
- where
- fix complex joining cases:
- limit clauses with left outer joins ?
- see add_limited_ids_condition
- select_limited_ids_list
- extract adapters
- cache expiry on write
- rewrite of arecord querycache test in light of this
@ -61,6 +65,7 @@ done:
- test Value, in particular bind.
- test blank checks in relation.rb
- rename active_relation to arel
- fix complex joining cases:
icebox:
- #bind in Attribute and Expression should be doing a descend?

View file

@ -23,6 +23,7 @@ module Arel
def to_sql(formatter = nil)
"#{operand1.to_sql} #{predicate_sql} #{operand1.format(operand2)}"
end
alias_method :to_s, :to_sql
end
class Equality < Binary

View file

@ -37,6 +37,11 @@ module Arel
end
end
# TESTME: Not sure which scenario needs this method, was driven by failing tests in ActiveRecord
def column_for(attribute)
(relation1[attribute] || relation2[attribute]).column
end
def joins
this_join = [
join_sql,