aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/writes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/algebra/relations/writes.rb')
-rw-r--r--lib/arel/algebra/relations/writes.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/arel/algebra/relations/writes.rb b/lib/arel/algebra/relations/writes.rb
deleted file mode 100644
index 7df6d861a8..0000000000
--- a/lib/arel/algebra/relations/writes.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-module Arel
- class Action < Compound
- end
-
- class Deletion < Action
- def call
- engine.delete(self)
- end
-
- def to_sql
- compiler.delete_sql
- end
- end
-
- class Insert < Action
- attr_reader :record
-
- def initialize(relation, record)
- super(relation)
- @record = record.bind(relation)
- end
-
- def call
- engine.create(self)
- end
-
- def eval
- unoperated_rows + [Row.new(self, record.values.collect(&:value))]
- end
-
- def to_sql(include_returning = true)
- compiler.insert_sql(include_returning)
- end
- end
-
- class Update < Insert
- alias :assignments :record
-
- def call
- engine.update(self)
- end
-
- def to_sql
- compiler.update_sql
- end
- end
-end