aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sql_algebra/relations/relation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sql_algebra/relations/relation.rb')
-rw-r--r--lib/sql_algebra/relations/relation.rb13
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