Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor microsecond precision to be database agnostic | Sean Griffin | 2015-02-10 | 1 | -5/+5 |
| | | | | | | | | | | The various databases don't actually need significantly different handling for this behavior, and they can achieve it without knowing about the type of the object. The old implementation was returning a string, which will cause problems such as breaking TZ aware attributes, and making it impossible for the adapters to supply their logic for time objects. | ||||
* | Don't default to YAML dumping when quoting values | Sean Griffin | 2015-01-14 | 1 | -8/+5 |
| | | | | | | | This behavior exists only to support fixtures, so we should handle it there. Leaving it in `#quote` can cause very subtle bugs to slip through, by things appearing to work when they should be blowing up loudly, such as #18385. | ||||
* | Always pass a column with a type object to quote | Sean Griffin | 2014-06-28 | 1 | -11/+0 |
| | | | | | | | | The only case where we got a column that was not `nil`, but did not respond to `cast_type` was when type casting the default value during schema creation. We can look up the cast type, and add that object to the column definition. Will allow us to consistently rely on the type objects for type casting in all directions. | ||||
* | Don't use column object for type casting in `quoting` | Sean Griffin | 2014-06-18 | 1 | -25/+0 |
| | | | | | | | | | We're never going to be able to use the attribute object here, however, so let's just accept the ugly demeter violation here for now. Remove test cases which were either redundant with other tests in the file, or were actually testing the type objects (which are tested elsewhere) | ||||
* | Remove checks against `column.type` in abstract adapter quoting | Sean Griffin | 2014-05-26 | 1 | -18/+10 |
| | | | | | | The intention is to eventually remove `column` from the arguments list both for `quote` and for `type_cast` entirely. This is the first step to that end. | ||||
* | prevent global timezone state from leaking out of test cases. | Yves Senn | 2013-10-25 | 1 | -5/+5 |
| | |||||
* | Remove redundant `string_to_binary` from type-casting | Vipul A M | 2013-08-09 | 1 | -19/+0 |
| | |||||
* | use method with_active_record_default_timezone | Neeraj Singh | 2013-07-29 | 1 | -30/+20 |
| | |||||
* | Revert "Merge pull request #9207 from dylanahsmith/mysql-quote-numeric" | Steve Klabnik | 2013-02-27 | 1 | -7/+7 |
| | | | | | This reverts commit 408227d9c5ed7de26310d72a1a99c1ee02311c63, reversing changes made to dca0b57d03deffc933763482e615c3cf0b9a1d97. | ||||
* | active_record: Quote numeric values compared to string columns. | Dylan Smith | 2013-02-07 | 1 | -7/+7 |
| | |||||
* | fix quoting for ActiveSupport::Duration instances | Francesco Rodriguez | 2012-07-04 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | This patch fixes quoting for ActiveSupport::Duration instances: # before >> ActiveRecord::Base.connection.quote 30.minutes => "'--- 1800\n...\n'" # after >> ActiveRecord::Base.connection.quote 30.minutes => "1800" Also, adds a test for type casting ActiveSupport::Duration instances. Related to #1119. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -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. | ||||
* | do not depend on to_yaml being called, but rather depend on YAML being dumped | Aaron Patterson | 2011-04-13 | 1 | -6/+7 |
| | |||||
* | Make serialized fixtures work again | Pratik Naik | 2010-12-29 | 1 | -2/+2 |
| | |||||
* | all columns respond to string_to_binary, so no need to check respond_to? | Aaron Patterson | 2010-10-12 | 1 | -3/+8 |
| | |||||
* | test quoting a string with an unknown column type | Aaron Patterson | 2010-10-12 | 1 | -0/+4 |
| | |||||
* | test quoting multibyte chars object | Aaron Patterson | 2010-10-12 | 1 | -0/+20 |
| | |||||
* | test quoting strings with binary columns | Aaron Patterson | 2010-10-12 | 1 | -0/+13 |
| | |||||
* | test quoting a string with a float column | Aaron Patterson | 2010-10-12 | 1 | -0/+5 |
| | |||||
* | testing quoting a string for an int column | Aaron Patterson | 2010-10-12 | 1 | -0/+12 |
| | |||||
* | testing crazy object quoting | Aaron Patterson | 2010-10-12 | 1 | -0/+12 |
| | |||||
* | test that dates / times / datetimes call quoted_date | Aaron Patterson | 2010-10-12 | 1 | -0/+10 |
| | |||||
* | test quoting of bigdecimals | Aaron Patterson | 2010-10-12 | 1 | -0/+6 |
| | |||||
* | testing floats, fixnum, and bignums | Aaron Patterson | 2010-10-11 | 1 | -0/+18 |
| | |||||
* | test quoting nils, true, false, id | Aaron Patterson | 2010-10-11 | 1 | -0/+20 |
| | |||||
* | getting quoted_time under more specific tests | Aaron Patterson | 2010-10-11 | 1 | -0/+65 |
| | |||||
* | starting to get the quote module under test | Aaron Patterson | 2010-10-11 | 1 | -0/+30 |