aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/visitors/mssql.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #35664 from jeremyevans/remove-roflscalingRafael França2019-03-191-1/+1
|\ | | | | Remove roflscaling
| * Remove roflscalingJeremy Evans2019-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | roflscaling (using frozen string constants instead of literal strings) was added in 2012, before frozen string literals were added in Ruby 2.3. Now that Rails no longer supports Ruby <2.3, and all of these files use frozen string literals, there is no reason to keep the roflscaling. This does not delete or deprecate the related constants. Such a change can be made in a later commit.
* | Extract `sanitize_as_sql_comment` from SQL visitor into connectionRyuta Kamizono2019-03-191-1/+2
|/ | | | Probably that is useful for any other feature as well.
* Support Optimizer HintsRyuta Kamizono2019-03-161-0/+13
| | | | | | | | | | | | | | | | | | We as Arm Treasure Data are using Optimizer Hints with a monkey patch (https://gist.github.com/kamipo/4c8539f0ce4acf85075cf5a6b0d9712e), especially in order to use `MAX_EXECUTION_TIME` (refer #31129). Example: ```ruby class Job < ApplicationRecord default_scope { optimizer_hints("MAX_EXECUTION_TIME(50000) NO_INDEX_MERGE(jobs)") } end ``` Optimizer Hints is supported not only for MySQL but also for most databases (PostgreSQL on RDS, Oracle, SQL Server, etc), it is really helpful to turn heavy queries for large scale applications.
* Arel: Implemented DB-aware NULL-safe comparison (#34451)Dmytro Shteflyuk2018-11-151-0/+25
| | | | | | | | | * Arel: Implemented DB-aware NULL-safe comparison * Fixed where clause inversion for NULL-safe comparison * Renaming "null_safe_eq" to "is_not_distinct_from", "null_safe_not_eq" to "is_distinct_from" [Dmytro Shteflyuk + Rafael Mendonça França]
* Abandon TOP support.Vladimir Kochnev2018-09-251-7/+0
| | | | | | | | | | | | | | | | Initially, `TOP` was introduced to support `limit` for MSSQL database. Unlike PostgreSQL/MySQL/SQLite, MSSQL does not have native `LIMIT`/`OFFSET` support. The commit adding `TOP` is 1a246f71616cf246a75ef6cbdb56032e43d4e643. However, it figured out that `TOP` implementation was weak and it's not sufficient to also support `OFFSET`, then `TOP` was substituted with `ROW_NUMBER()` subquery in be48ed3071fd6524d0145c4ad3faeb4aafe3eda3. This is a well known trick in MSSQL - https://stackoverflow.com/questions/2135418/equivalent-of-limit-and-offset-for-sql-server. So now we don't need this `visit_Arel_Nodes_Top` at all. It does nothing useful but also adds an extra space after `SELECT` when `LIMIT` is being used for **any** database.
* Arel: :nodoc: allMatthew Draper2018-02-241-1/+1
|
* Arel: rubocop -aMatthew Draper2018-02-241-88/+89
|
* Merge Arel into Active RecordMatthew Draper2018-02-241-0/+124