Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 71ac8c050a
Fetching contributors…

Cannot retrieve contributors at this time

71 lines (60 sloc) 3.163 kB
* TODO:
* Make Comparator handle subclasses without having to specify the attribtues
again in each descendant.
* Convert Tuple to a Struct
* Make Header a "Struct Class", and copy all the Header instance methods to
the class level. Move all the Tuple instance methods into the Header
instance.
* Rename Header as Tuple
* Make sure the Tuple has a class level method called #header that returns
the set of attributes.
* Use a class variable to store each "Tuple class" so that anything with a
similar header will be reused.
* Remove mean/variance/stddev modules from Virtus::Attribute::Comparable
* It makes no sense for comparable objects to be "averaged", what would it
mean to get the average string?
* Remove Order, Reverse, Limit and Offset from the Relation inheritance chain
* Instead make it so they are proxy classes that wrap Relations, but
proxy method calls to the Relation methods, and then wrap the return
value (assuming it's a Relation) in a copy of itself.
* Also this will allow knowledge of #directions to be removed from
all the Relation classes. Only the Ranking classes will need to know
about directions.
* The Reverse class will probably not be needed either. All we need is
for the #reverse method to create a new Order with the directions
reversed.
* Remove the knowledge of directions from materialized relations
and instead wrap materialized relations in the Order object
if any.
* Add Relation#group and Relation#ungroup
* Update Attributes so that constraints are modelled using predicates,
so that when "join-ability" is tested, the predicates can just be
compared for equality.
* Create an object that can wrap a predicate, and if it fails it will
set the object's error state, and then propagate the status to the
caller. This will allow a "complex" predicate to set the errors
on tuples, while still allowing all the same objects to be used.
* Update memoization to take into account the arguments passed into
the method. It should memoize differently for different
methods. Perhaps it could have a special case for methods
with a 0-arity vs n-arity methods, but it needs to handle cases
like with #hash that accept no args, and #optimize that accepts
1 arg.
* Within the restriction context, make sure the attributes have aliases for:
* Alias #== to #eq (may break alot)
* Alias #!= to #ne (in 1.9 only)
* Alias #>= to #gte
* Alias #> to #gt
* Alias #<= to #lte
* Alias #< to #lt
* Alias #=~ to #match
* Within the sort_by context, make sure the attributes have aliases for:
* Alias #@+ to #asc
* Alias #@- to #desc
* Handle case where one attribute is required, and the other is not, when joined
(or other ops), the resulting attribute should always be required.
* In other operations, the resulting attribute may be something else, but will
need to research to know how to handle this.
* Current behaviour is to require both attributes are equivalent all the way
around to allow them to be joined. This constraint will need to be relaxed
to implement this new behaviour.
Jump to Line
Something went wrong with that request. Please try again.