diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2007-12-30 11:35:44 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2007-12-30 11:35:44 -0800 |
commit | 960bbcb3ce4a82cf4f031d1c6682ce4c1a04474d (patch) | |
tree | 24e8e29629450700940d3bdc233265648b5f73f2 /lib/sql_algebra/relations/relation.rb | |
download | rails-960bbcb3ce4a82cf4f031d1c6682ce4c1a04474d.tar.gz rails-960bbcb3ce4a82cf4f031d1c6682ce4c1a04474d.tar.bz2 rails-960bbcb3ce4a82cf4f031d1c6682ce4c1a04474d.zip |
initial import
Diffstat (limited to 'lib/sql_algebra/relations/relation.rb')
-rw-r--r-- | lib/sql_algebra/relations/relation.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sql_algebra/relations/relation.rb b/lib/sql_algebra/relations/relation.rb new file mode 100644 index 0000000000..f1f8fc5884 --- /dev/null +++ b/lib/sql_algebra/relations/relation.rb @@ -0,0 +1,13 @@ +class Relation + def *(other) + JoinOperation.new(self, other) + end + + def [](attribute_name) + Attribute.new(self, attribute_name) + end + + def include?(attribute) + RelationInclusionPredicate.new(attribute, self) + end +end
\ No newline at end of file |