Commit Graph

4053 Commits

Author SHA1 Message Date
Aaron Patterson
42be67e8d4 unfactoring clear_stale_cached_connections! 2010-07-16 14:48:50 -07:00
Aaron Patterson
8d17f53318 adding a test for clearing stale connections 2010-07-16 14:39:40 -07:00
Aaron Patterson
7ba54ff711 fixing test file name 2010-07-16 13:54:14 -07:00
Aaron Patterson
2244bb0013 fixing whitespace errors 2010-07-16 13:50:58 -07:00
Aaron Patterson
04ef434b21 only test for existence of +pool+ once 2010-07-16 11:44:29 -07:00
Aaron Patterson
b952470cc2 use an attr_reader for performance 2010-07-16 11:44:29 -07:00
Santiago Pastorino
79d9e0f155 Makes this test don't trust on the speed of execution 2010-07-17 02:39:26 +08:00
Aaron Patterson
1b2824b659 fixing typeo. thanks bamnet! 2010-07-16 09:13:51 -07:00
Neeraj Singh
1f2a5199cb moving persistence related tests to a new file
Before refactoring test result from AR:
2291 tests, 7180 assertions, 0 failures, 0 errors

After the refactoring test result from AR:
2291 tests, 7180 assertions, 0 failures, 0 errors

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-16 17:26:06 +02:00
Pratik Naik
130bf3c9ed Fix data loading from the performance script 2010-07-16 08:28:49 +01:00
David Genord II
1fcf4e8ecb JoinDependency#graft does not properly set parent join [#5124 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-07-16 08:28:49 +01:00
Santiago Pastorino
fcb230144b Bump up nokogiri, memcache-client, sqlite3-ruby, fcgi, mail and tzinfo 2010-07-15 13:18:47 -07:00
Pratik Naik
0c2c893434 Revert "Style fixes"
This reverts commit 3c300b3121.
2010-07-15 13:17:35 +01:00
Aaron Patterson
62dd1d8d23 clean up ||= with an initialized variable and attr_reader 2010-07-14 17:53:20 -07:00
wycats
3c300b3121 Style fixes 2010-07-14 17:33:07 -07:00
Aaron Patterson
955b26ac6e primary_key_name already checks for the model_class 2010-07-14 17:11:52 -07:00
Aaron Patterson
d41a28bcca use array intersection for dry / faster code 2010-07-14 17:09:14 -07:00
Aaron Patterson
1db8ed0f4b activerecord tests should inherit from ActiveRecord::TestCase 2010-07-14 16:35:52 -07:00
Aaron Patterson
6a534455f6 remove useless ternary in PostgreSQL adapter 2010-07-14 15:44:15 -07:00
Aaron Patterson
8ba14c238e PostgreSQLAdapter#query string interpolation calls to_s for us 2010-07-14 15:18:48 -07:00
Aaron Patterson
51c9b666e6 PostgreSQLAdapter#query bail early if there is no column and dry up our conditionals 2010-07-14 15:10:45 -07:00
Aaron Patterson
36150c902b Let's initialize instance variables in the postgres adapter. 2010-07-14 15:04:14 -07:00
Pratik Naik
d5921cdb7a Remove unintentional API changes. [#1108] 2010-07-14 18:32:28 +01:00
Pratik Naik
4a06489525 Style fixes 2010-07-14 16:50:26 +01:00
Xavier Noria
b7944e1b21 revises the rdoc of update_attributes and update_attributes! to document they are wrapped in a transaction, and adds code comments explaining why 2010-07-14 17:42:57 +02:00
Jacob Lewallen
d10ecfefb8 Set destroyed=true in opt locking's destroy [#5058 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-14 08:02:17 +02:00
Neeraj Singh
edb5401039 count method should not take options if it is operated on has_many association which has finder_sql or counter_sql
[#2395 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 22:03:35 +02:00
Neeraj Singh
f4fbc2c1f9 update_attributes and update_attributes! are now wrapped in a transaction
[#922 state:resovled]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 22:02:00 +02:00
Aaron Patterson
e35e6171bb reducing range comparisons when converting types to sql 2010-07-13 11:56:00 -07:00
Aaron Patterson
35e304193b only loop through all rows and columns once in the postgres adapter 2010-07-13 10:57:22 -07:00
Aaron Patterson
bc35631dc7 use constants instead of magic numbers. meow 2010-07-13 10:57:22 -07:00
Xavier Noria
6d2e4ee96c Merge remote branch 'docrails/master' 2010-07-13 18:41:09 +02:00
Benjamin Quorning
7e075e6247 Fixed many references to the old config/environment.rb and Rails::Initializer 2010-07-13 13:00:21 +02:00
Vitalii Khustochka
b75fca9e57 Added reorder delegation for ActiveRecord::Base(to be able to overwrite the default_scope ordering in the named scope [#5093 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:31:55 +02:00
Will St. Clair + Neeraj Singh
b520d602ff string IDs are now quoted correctly [#5064 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:14:52 +02:00
Subba Rao Pasupuleti
44e7fba59e renaming test name to fix accidently override
[#5076 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:09:57 +02:00
Mislav Marohnić
571cb1ddc6 enable AS::JSON.encode to encode AR::Relation by providing as_json method
[#5073 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:09:28 +02:00
José Valim
3401311562 Tidying up a bit, so update_attribute is not called twice on touch. 2010-07-13 08:05:09 +02:00
Neeraj Singh
1d45ea0814 with this fix touch method - does not call validations - doest not call callbacks - updates updated_at/on along with attribute if attribute is provided - marks udpated_at/on and attribute as NOT changed
[#2520 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 07:03:42 +02:00
Aaron Patterson
2aed63eb52 our method is modifying the original array, so refactor to use destructive methods 2010-07-12 17:58:48 -07:00
Aaron Patterson
2c3aab32dd PostgreSQLAdapter#select_raw removing dead code 2010-07-12 17:52:53 -07:00
Aaron Patterson
79e9f4a318 PostgreSQLAdapter#select_raw use each_with_index to avoid multiple array lookups 2010-07-12 17:49:12 -07:00
Aaron Patterson
8521cdf03d PostgreSQLAdapter#select_raw fields and results are empty even if ntuples is 0 2010-07-12 17:44:15 -07:00
Aaron Patterson
c9710a43ff refactor PostgreSQLAdapter#result_as_array to create fewer Range objects 2010-07-12 17:00:29 -07:00
Aaron Patterson
7c4e0401d2 cleaning up PostgreSQLAdapter#select 2010-07-12 16:54:00 -07:00
Aaron Patterson
cee2ff2768 these strings do not need to be frozen 2010-07-12 16:43:20 -07:00
Aaron Patterson
8fb838ed16 use Hash#each to avoid a second hash lookup 2010-07-12 16:32:45 -07:00
José Valim
6b29dc876f Just add connection management middleware if running in a concurrent environment. 2010-07-12 20:18:54 +02:00
José Valim
da84c9d0d2 Remove old rubygems require. 2010-07-12 20:18:04 +02:00
Aaron Patterson
f33ee69d59 reducing funcalls, cleaning up primary key methods for sqlite adapter 2010-07-10 13:30:49 -07:00