aboutsummaryrefslogtreecommitdiffstats
path: root/doc/TODO
blob: fc18af28b607a5e16c2ed26580c74b2d64f5e042 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
todo:
- active record query adapter
- audit active record quoting
- incorporate linq functionality/terminology
  - then_by (ordering)
  - reverse
  - any/all
  - where
- 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

done:
- mock out database
. Relation <=> Relation -> InnerJoinOperation
. Relation << Relation -> LeftOuterJoinOperation
. InnerJoinOperation.on(*Predicate) -> InnerJoinRelation
. LeftOuterJoinOperation.on(*Predicate) -> LeftOuterJoinRelation
. Relation[Symbol] -> Attribute
. Relation[Range] -> Relation
. Attribute == Attribute -> EqualityPredicate
. Attribute >= Attribute -> GreaterThanOrEqualToPredicate
. Relation.include?(Column) -> Predicate
. Relation.project(*Column) -> ProjectionRelation
. Relation.select(*Predicate) -> SelectionRelation
. Relation.order(*Column) -> OrderRelation
. #to_sql
. Remove Builder
. Namespace
. Audit SqlAlchemy for missing features
- Generalized denormalizations on any aggregation (count, yes, but also max, min, average)
- Remove operator overloading of << and <=> for joins. Make it just foo.join(bar) and foo.outer_join(bar).
- Remove operator overloading of == for predicates. make it a.eq(b) (note lack of question mark).
- hookup more predicates (=, <=, =>)
- get some basic aggregations working: users.project(user[:points].max)
- Alias Table Names
- When joining with any sort of aggregation, it needs to be a nested select
- get a value select working: users.project(users[:name], addresses.select(addresses[:user_id] == users[:id]).project(addresses[:id].count))
- Session
- sublimate values to deal with the fact that they must be quoted per engine
- clean-up singleton monstrosity
- extract hashing module
- hash custom matcher
- make session engine stuff follow laws of demeter - currently doing some odd method chaining? rethink who is responsible for what
  - session just calls execute, passing in a connection; by default it gets a connection from the relation.
- #formatter is now on value, attribute and relation; you must admit it's name is confusing given that e.g., relation already has a formatter (Sql::Relation) ... should it be called predicate formatter? 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
- need to_sql for ranges
  - {:conditions=>{:id=>2..3}}
- nested orderings
- string passthrough
  - conditions
  - orderings
- relation inclusion when given an array (1,2,3,4) should quote the elements using the appropriate quoting formatter taken from the attribute
  - descend on array, along with bind written in terms of it
- re-evaluate bind -- does bind belong inside the relation / predicate classes or in the factory methods?
- string passthrough:
 :joins=>"INNER JOIN posts ON comments.post_id = posts.id"
- finish pending tests
- test relation, table reset
- 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?
- try to make aggegration testing in join spec to be a bit more unit-like
- standardize quoting  
  - use strings everywhere, not symbols ?
- "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