Commit Graph

5333 Commits

Author SHA1 Message Date
Aaron Patterson
5046120b97 comma limits do not make sense on oracle or pg 2011-02-08 16:54:07 -08:00
Aaron Patterson
1c6f4562d7 primary keys should not be cleared on cache clear, fixing oracle tests 2011-02-08 16:01:16 -08:00
Aaron Patterson
0b58a7ff42 limit() should sanitize limit values
This fixes CVE-2011-0448
2011-02-08 14:21:12 -08:00
Aaron Patterson
8ce57652b2 ignore max identifier length queries from pg 2011-02-08 13:38:05 -08:00
Aaron Patterson
cd440236ad this test requires the job model, so we should require it 2011-02-08 11:31:46 -08:00
Jan
9643243204 make set_table_name take effect immediately 2011-02-08 10:31:09 -08:00
Aaron Patterson
ac86923fca no more faker, rbench, or addressable 2011-02-07 19:53:22 -08:00
Aaron Patterson
08ef06dbf1 just return the record from insert_record, use truthiness for comparisons 2011-02-07 16:25:22 -08:00
Aaron Patterson
2b4de6621f require tag since we need it for this test 2011-02-07 16:09:33 -08:00
Jon Leighton
4f7bdc8f74 Documentation for recent refinements to association deletion 2011-02-07 23:35:05 +00:00
Jon Leighton
e62b576472 Refactor the implementations of AssociatioCollection#delete and #destroy to be more consistent with each other, and to stop passing blocks around, thus making the execution easier to follow. 2011-02-07 23:35:05 +00:00
Jon Leighton
d9870d92f7 This string should continue 2011-02-07 23:35:05 +00:00
Jon Leighton
52f09eac5b Correctly update counter caches on deletion for has_many :through [#2824 state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business. 2011-02-07 23:35:05 +00:00
Jon Leighton
05bcb8cecc Support the :dependent option on has_many :through associations. For historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association. 2011-02-07 23:35:05 +00:00
Jon Leighton
d55406d2e9 Make record.association.destroy(*records) on habtm and hm:t only delete records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry. 2011-02-07 23:35:05 +00:00
Aaron Patterson
5f1ea2a26b we do not use this method, so delete 2011-02-07 15:28:49 -08:00
Aaron Patterson
30bba95a04 update ignored SQL for oracle 2011-02-07 15:12:21 -08:00
Aaron Patterson
1193709cd6 removing some freedom patches. use notification system to count sql queries 2011-02-07 14:35:11 -08:00
Aaron Patterson
9f773d66b5 mysql2 should log these sql statements 2011-02-07 14:35:11 -08:00
Aaron Patterson
0de661d6c7 the connection pool caches table_exists? calls 2011-02-07 09:26:52 -08:00
Akira Matsuda
65e08cfb4f do not to_s where you are testing that a string value is stored for the before_type_cast
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-07 09:52:24 -02:00
Akira Matsuda
40aefb9301 avoid nil.dup
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-07 09:51:51 -02:00
John Hawthorn
a3f5d7159d fix db:fixtures:load with FIXTURES specified [#6061 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-06 18:45:42 -02:00
Xavier Noria
8b5dc9caa5 Merge branch 'master' of git://github.com/lifo/docrails 2011-02-05 19:47:08 +01:00
Brian Morearty
c56e314866 Updates to ActiveRecord::Timestamp documentation.
Change ActiveRecord::Base.xyz to config.active_record.xyz in docs.

Remove <tt> from code samples.

Update skip_time_zone_conversion_for_attributes code sample: put the call in the model class.

Clarify that skip_time_zone_conversion_for_attributes skips converion when reading.
2011-02-05 09:07:00 -08:00
Aaron Patterson
59f7780a34 adjust query counts to be consistent across databases, make sure database log the same things 2011-02-04 18:14:59 -08:00
Aaron Patterson
acccb72cb1 column cache now lives on the connection pool 2011-02-04 18:14:59 -08:00
Aaron Patterson
c94651f8c8 almost fisted 2011-02-04 18:14:59 -08:00
Aaron Patterson
0cd42864e3 making sure primary key is set on the columns 2011-02-04 18:14:59 -08:00
Aaron Patterson
5f3cf4244d connection pool can cache column, table, and primary key information 2011-02-04 18:14:59 -08:00
Edward Faulkner
909588d964 Fixing ordering of HABTM association deletion [#6191 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-04 19:39:59 -02:00
Aaron Patterson
df07760486 introduce a fake AR adapter for mocking database return values 2011-02-04 13:34:57 -08:00
Kevin Skoglund
94175c0e39 Improve regex in rake db:migrate status [#5940 state:resolved]
[#5940 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-04 12:59:06 -02:00
Gabriel Horner
ac15647bf0 keep options titles consistent to "Options" 2011-02-03 23:51:06 -05:00
Aaron Patterson
89962d82f1 refactor a bunch of return / if to a case / when 2011-02-03 16:00:59 -08:00
Aaron Patterson
dde8933d60 add_limit_offset! is deprecated 2011-02-03 15:54:31 -08:00
Aaron Patterson
a88071e92a just use the superclass implementation 2011-02-03 15:48:34 -08:00
Aaron Patterson
7423a71fc0 allow AR caches to be cleared, clear them on class reloading 2011-02-03 15:35:44 -08:00
Aaron Patterson
23a3ba4260 Revert "ARel only requires the connection from the AR class. Simply return the AR class rather than jump through hoops and store ivars"
This reverts commit d65e3b481e.
2011-02-03 14:04:21 -08:00
Ken Collins
95d5d9b6c4 The type_cast_calculated_value method will trust DB types before casting to a BigDecimal.
[#6365 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 20:00:51 -02:00
Aaron Patterson
d65e3b481e ARel only requires the connection from the AR class. Simply return the AR class rather than jump through hoops and store ivars 2011-02-03 11:50:43 -08:00
Aaron Patterson
1a15fda021 reduce cache misses on STI subclasses 2011-02-03 11:12:07 -08:00
Aaron Patterson
a5d8f0be00 this method should be private 2011-02-03 09:09:27 -08:00
Guillermo Álvarez
351331fb34 Make serialized columns with explicit object_type return a new instance of the object instead of nil 2011-02-03 09:08:45 -08:00
Xavier Noria
a96a9a4948 Merge branch 'master' of git://github.com/lifo/docrails 2011-02-02 22:04:11 +01:00
Aaron Patterson
8bfa8e7cbe this method should never return nil 2011-02-02 10:25:53 -08:00
Aaron Patterson
3fc598095e just require mysql2 2011-02-02 10:25:53 -08:00
Santiago Pastorino
12b2f8b040 Delete blank lines in migration generator 2011-02-02 16:20:03 -02:00
Aaron Patterson
70b9db173e adding mysql2 adapter 2011-02-02 10:17:39 -08:00
Raimonds Simanovskis
9e23835cb8 fix for test_read_attributes_before_type_cast_on_datetime - Oracle adapter also returns Time value 2011-02-02 09:06:42 -08:00