1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove Arel::Crud from Arel::Table

Originally `compile_update` and `compile_delete` doesn't work at all on
`Arel::Table` since `Arel::Table` doesn't have `@ast` and `@ctx`.

`compile_insert` and `create_insert` works but do not use the receiver's
information at all, so just use `Arel::InsertManager.new(arel_table)`
instead.
This commit is contained in:
Ryuta Kamizono 2021-03-01 20:16:20 +09:00
parent 6ee96a8f42
commit cc5f6457cc
2 changed files with 0 additions and 8 deletions

View file

@ -2,7 +2,6 @@
module Arel # :nodoc: all
class Table
include Arel::Crud
include Arel::FactoryMethods
include Arel::AliasPredication

View file

@ -42,13 +42,6 @@ module Arel
assert_equal "bar", join.right
end
it "should return an insert manager" do
im = @relation.compile_insert "VALUES(NULL)"
assert_kind_of Arel::InsertManager, im
im.into Table.new(:users)
assert_equal "INSERT INTO \"users\" VALUES(NULL)", im.to_sql
end
describe "skip" do
it "should add an offset" do
sm = @relation.skip 2