aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/sqlite3/explain_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Change tests to use models which don't ignore any columnsJon Moss2017-11-131-11/+11
|
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Make preload query to preparableRyuta Kamizono2017-07-071-1/+1
| | | | | | | Currently preload query cannot be prepared statements even if `prepared_statements: true` due to array handler in predicate builder doesn't support making bind params. This makes preload query to preparable by don't passing array value if possible.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Should escape meta characters in regexpRyuta Kamizono2017-05-071-2/+2
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix explain logging with bindsRyuta Kamizono2016-07-201-2/+2
| | | | `binds` is an array of a query attribute since Active Record 5.0.
* Remove unnecessary namespaces in `explain_test.rb`Ryuta Kamizono2016-02-291-19/+13
|
* Fix tests failure with `prepared_statements: false`Ryuta Kamizono2016-02-291-2/+2
| | | | | | Some tests does not work for unprepared statements. Add `if ActiveRecord::Base.connection.prepared_statements` and fix a regex for fix tests failure with `prepared_statements: false`.
* make it possible to run AR tests with bin/testYves Senn2015-06-111-1/+1
|
* Go through normal `where` logic when preloading associationsSean Griffin2014-12-261-1/+1
| | | | | | | | | | This will allow eager type casting to take place as needed. There doesn't seem to be any particular reason that the `in` statement was forced for single values, and the commit message where it was introduced gives no context. See https://github.com/rails/rails/commit/d90b4e2615e8048fdeffc6dffe3246704adee01f
* Build fix when running in isolationArun Agrawal2014-11-141-0/+1
| | | | | `Computer` class needs to be require See #17217 for more details
* working against arel/collector branchAaron Patterson2014-04-091-3/+3
|
* fixing explain tests for sqlite3Aaron Patterson2014-01-171-13/+13
|
* experimentAaron Patterson2013-05-171-13/+13
|
* add the query to AR::Relation#explain outputXavier Noria2011-11-251-0/+3
| | | | | | | Rationale: this is more readable if serveral queries are involved in one call. Also, it will be possible to let AR log EXPLAINs automatically in production mode, where queries are not even around.
* revises EXPLAIN tests for SQLite3Xavier Noria2011-11-061-3/+3
| | | | | | | | | | The output in Travis is a bit different. The SQLite documentation (http://www.sqlite.org/eqp.html) warns output may change dramatically between releases. I do not want to mock the result set because I want a real EXPLAIN to happen. I prefer a test that may fail in future releases than a test that may give false positives in future releases.
* implements AR::Relation#explainXavier Noria2011-11-051-0/+23
This is a first implementation, EXPLAIN is highly dependent on the database and I have made some compromises. On one hand, the method allows you to run the most common EXPLAIN and that's it. If you want EXPLAIN ANALYZE in PostgreSQL you need to do it by hand. On the other hand, I've tried to construct a string as close as possible to the ones built by the respective shells. The rationale is that IMO the user should feel at home with the output and recognize it at first sight. Per database. I don't know whether this implementation is going to work well. Let's see whether people like it.