1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/arel/visitors
Ryuta Kamizono 859fba7c4b Handle DELETE with LIMIT in Arel
MySQL supports DELETE with LIMIT and ORDER BY.

https://dev.mysql.com/doc/refman/8.0/en/delete.html

Before:

```
  Post Destroy (1.0ms)  DELETE FROM `posts` WHERE `posts`.`id` IN (SELECT `id` FROM (SELECT `posts`.`id` FROM `posts` WHERE `posts`.`author_id` = ? ORDER BY `posts`.`id` ASC LIMIT ?) __active_record_temp)  [["author_id", 1], ["LIMIT", 1]]
```

After:

```
  Post Destroy (0.4ms)  DELETE FROM `posts` WHERE `posts`.`author_id` = ? ORDER BY `posts`.`id` ASC LIMIT ?  [["author_id", 1], ["LIMIT", 1]]
```
2018-09-30 21:21:54 +09:00
..
depth_first.rb Remove visit_Fixnum and visit_Bignum 2018-09-30 10:26:05 +09:00
dot.rb Remove visit_Fixnum and visit_Bignum 2018-09-30 10:26:05 +09:00
ibm_db.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
informix.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
mssql.rb Abandon TOP support. 2018-09-25 15:39:14 +04:00
mysql.rb Handle DELETE with LIMIT in Arel 2018-09-30 21:21:54 +09:00
oracle.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
oracle12.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
postgresql.rb Fix: Arel Postgresql visitor generates invalid SQL for GROUPING SETS. 2018-05-28 12:11:57 +02:00
sqlite.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
to_sql.rb Handle DELETE with LIMIT in Arel 2018-09-30 21:21:54 +09:00
visitor.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30
where_sql.rb Arel: :nodoc: all 2018-02-24 18:11:47 +10:30