aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/writes/insert.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/relations/writes/insert.rb')
-rw-r--r--lib/arel/relations/writes/insert.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/arel/relations/writes/insert.rb b/lib/arel/relations/writes/insert.rb
deleted file mode 100644
index d579ad06d0..0000000000
--- a/lib/arel/relations/writes/insert.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-module Arel
- class Insert < Compound
- attributes :relation, :record
- deriving :==
-
- def initialize(relation, record)
- @relation, @record = relation, record.bind(relation)
- end
-
- def to_sql(formatter = nil)
- [
- "INSERT",
- "INTO #{table_sql}",
- "(#{record.keys.map { |key| engine.quote_column_name(key.name) }.join(', ')})",
- "VALUES (#{record.map { |key, value| key.format(value) }.join(', ')})"
- ].join("\n")
- end
-
- def call(connection = engine)
- connection.insert(to_sql)
- end
- end
-end