aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/bind_parameter_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove Relation#bind_paramsSean Griffin2015-01-271-16/+4
| | | | | | | | `bound_attributes` is now used universally across the board, removing the need for the conversion layer. These changes are mostly mechanical, with the exception of the log subscriber. Additional, we had to implement `hash` on the attribute objects, so they could be used as a key for query caching.
* Use an `Attribute` object to represent a bind valueSean Griffin2015-01-271-2/+2
| | | | | | | | | | | The column is primarily used for type casting, which we're trying to separate from the idea of a column. Since what we really need is the combination of a name, type, and value, let's use the object that we already have to represent that concept, rather than this tuple. No consumers of the bind values have been changed, only the producers (outside of tests which care too much about internals). This is *finally* possible since the bind values are now produced from a reasonable number of lcoations.
* Correctly fetch bind_values from join in subquerybrainopia2015-01-061-1/+9
|
* Remove the unused second argument to `substitute_at`Sean Griffin2014-11-171-2/+2
| | | | Oh hey, we got to remove some code because of that!
* rm `reorder_bind_params`Sean Griffin2014-11-171-2/+2
| | | | | | Arel handles this for us automatically. Updated tests, as BindParam is no longer a subclass of SqlLiteral. We should remove the second argument to substitute_at entirely, as it's no longer used
* Remove `Column#primary`Sean Griffin2014-05-231-5/+3
| | | | | | | | It appears to have been used at some point in the past, but is no longer used in any meaningful way. Whether a column is considered primary is a property of the model, not the schema/column. This also removes the need for yet another layer of caching of the model's schema, and we can leave that to the schema cache.
* Merge pull request #14524 from tgxworld/fix_unsubscribe_from_notificationsYves Senn2014-03-291-6/+6
|\ | | | | | | Fix tests not unsubscribing from Notifications.
| * Fix tests not unsubscribing from Notifications.Guo Xiang Tan2014-03-281-2/+2
|/ | | | See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* log bind variables after they were type casted.Yves Senn2013-11-091-0/+11
| | | | | | | | | | | | | | | The log output used to be confusing in situation where type casting has "unexpected" effects. For example when finding records with a `String`. BEFORE: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", "im-no-integer"]] AFTER: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", 0]]
* Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-36/+30
| | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* fix todo: use minitest skip instead of return nilFrancesco Rodriguez2012-05-131-9/+8
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* use index based substitution for bind parametersAaron Patterson2011-04-131-1/+1
|
* fixing tests on 1.8, using a list of lists because order is importantAaron Patterson2011-02-101-1/+1
|
* simplify bind parameter loggingAaron Patterson2011-02-101-1/+1
|
* bind parameters are logged to debug logAaron Patterson2011-02-101-2/+36
|
* test cases for bind parameter loggingAaron Patterson2011-02-101-0/+56