Jeremy Kemper
dc64887f21
Connection cache to speed up retrieve_connection and get rid of dirty connection marking. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:56:49 +00:00
Jeremy Kemper
1dfa0bd372
Don't use transactional fixtures for when DDL changes are involved.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:40:50 +00:00
Jeremy Kemper
6c9cfd64ca
MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat. Eliminate usage of mysql.ping because it doesn't guarantee reconnect. Explicitly close and reopen the connection instead. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-03 23:04:34 +00:00
David Heinemeier Hansson
6abda696b5
Added preliminary support for join models [DHH] Added preliminary support for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-03 04:29:55 +00:00
David Heinemeier Hansson
57b7532b91
Work-in progress for providing better join model support and polymorphic associations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 06:03:43 +00:00
Marcel Molina
2e42167058
Allow validate_uniqueness_of to be scoped by more than just one column. Closes #1559 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 04:30:46 +00:00
Jeremy Kemper
3d0e3c9290
Firebird: active? and reconnect! methods for handling stale connections. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 01:19:18 +00:00
Jeremy Kemper
13cfabb2ff
Firebird: updated for FireRuby 0.4.0. References #3009 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 00:37:32 +00:00
Jeremy Kemper
b44720452c
PostgreSQL: active? compatibility with the pure-Ruby driver. Still need to move connect into the adapter since postgres-pr doesn't support #reset. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 21:46:34 +00:00
Jeremy Kemper
75d0623b3d
MySQL: active? compatibility with the pure-Ruby driver. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 21:00:03 +00:00
Jeremy Kemper
14d50e9da3
Oracle: active? check pings the database rather than testing the last command status. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 19:50:10 +00:00
Florian Weber
87c3287912
Credit everybody that helped =)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 12:56:22 +00:00
Florian Weber
1f951bbf9f
Made test_update_attributes_after_push_without_duplicate_join_table_rows pass with Oracle Adapter. #2888
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3186 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 12:45:33 +00:00
Jeremy Kemper
6c1a356a1a
SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find. References #2974 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:15:00 +00:00
Jeremy Kemper
2b28575734
Reloading a model doesn't lose track of its connection. References #2996 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:01:43 +00:00
Jeremy Kemper
26f2fbf35f
Credit ticket author.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:40:23 +00:00
Florian Weber
c66ac2102b
Fixed bug where using update_attribute after pushing a record to a habtm association of the object caused duplicate rows in the join table. #2888
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-23 21:03:25 +00:00
Jeremy Kemper
e8f664dde0
MySQL, PostgreSQL: reconnect! also reconfigures the connection. Otherwise, the connection 'loses' its settings if it times out and is reconnected. Closes #2978 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-22 23:55:04 +00:00
Jeremy Kemper
d21ba5aec9
has_and_belongs_to_many: use JOIN instead of LEFT JOIN. References #2937 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 22:27:19 +00:00
Jeremy Kemper
f1a184fe88
MySQL: introduce :encoding option to specify the character set for client, connection, and results. Only available for MySQL 4.1 and later with the mysql-ruby driver. Do SHOW CHARACTER SET in mysql client to see available encodings. Closes #2975 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 18:51:27 +00:00
Jeremy Kemper
baad1c4cdc
Simpler Mysql load test.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 12:47:28 +00:00
Marcel Molina
119155bebb
Revert [3130]. Behavior of introducing Kernel.binding causes breakage.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 09:34:10 +00:00
Jeremy Kemper
5177333e70
Use Kernel.binding rather than binding to allow columns of that name. References #2973 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 08:34:50 +00:00
Marcel Molina
f18463f99e
Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-20 07:45:04 +00:00
Jeremy Kemper
81c5242f43
r3181@asus: jeremy | 2005-11-19 02:52:24 -0800
...
Mark connections for verification. Retrieve connection verifies before returning a connection. Verification tests whether the connection is marked then reconnects if the connection is inactive. All active connections are marked for verification after a request is handled. References #428 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 10:55:11 +00:00
Jeremy Kemper
77e0b7986e
Use query methods rather than readers in boolean tests for [3092]. References #2945 . Closes #2949 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 10:00:14 +00:00
Jeremy Kemper
2ed6d365bb
Correct boolean handling in generated reader methods. References #2945 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 09:53:36 +00:00
Jeremy Kemper
b51c3399eb
Don't generate read methods for columns whose names are not valid ruby method names. References #2946 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 06:47:26 +00:00
Jeremy Kemper
fd66ccb016
Document :force option to create_table. References #2921 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 20:48:10 +00:00
Jeremy Kemper
86da56a654
Don't add the same conditions twice in has_one finder sql. References #2916 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 20:45:38 +00:00
Marcel Molina
5cb2aa722d
Rename Version constant to VERSION. Closes #2802 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 00:32:16 +00:00
Jeremy Kemper
4cd8910279
r3118@asus: jeremy | 2005-11-16 00:32:48 -0800
...
correct prefetch_primary_key? table_name param
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 08:33:51 +00:00
Jeremy Kemper
9cb02c5317
r3116@asus: jeremy | 2005-11-16 00:17:06 -0800
...
Introducing the Firebird adapter. Closes #1874 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 08:18:13 +00:00
Jeremy Kemper
2076dca63f
r3095@asus: jeremy | 2005-11-15 22:40:51 -0800
...
Ticket #1874 - Firebird adapter
r3107@asus: jeremy | 2005-11-16 00:06:14 -0800
quote column aliases
r3108@asus: jeremy | 2005-11-16 00:08:12 -0800
quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys.
r3109@asus: jeremy | 2005-11-16 00:09:08 -0800
double-quote rather than single-quote sqlite columns
r3110@asus: jeremy | 2005-11-16 00:09:56 -0800
quote column names and use attribute_condition in validates_uniqueness_of
r3111@asus: jeremy | 2005-11-16 00:12:24 -0800
Use QUOTED_TYPE constant in tests
r3112@asus: jeremy | 2005-11-16 00:13:28 -0800
restrict test_inserts_with_pre_and_suffix to those adapters which support migrations
r3113@asus: jeremy | 2005-11-16 00:14:09 -0800
Use QUOTED_TYPE constant in tests
r3114@asus: jeremy | 2005-11-16 00:14:30 -0800
Use QUOTED_TYPE constant in tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 08:16:54 +00:00
Jeremy Kemper
c98011bc32
SQLServer: active? and reconnect! methods for handling stale connections. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3045 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-15 15:58:36 +00:00
Jeremy Kemper
e7b65b590a
SQLServer: active? and reconnect! methods for handling stale connections. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-15 11:35:14 +00:00
Jeremy Kemper
3441dfdb12
Associations handle case-equality more consistently: item.parts.is_a?(Array) and item.parts === Array. Closes #1345 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-15 10:48:32 +00:00
Jeremy Kemper
fb1efcaf91
SQLServer: insert uses given primary key value if not nil rather than SELECT @@IDENTITY. References #2866 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3035 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 22:24:55 +00:00
Jeremy Kemper
92045be6b3
Oracle: active? and reconnect! methods for handling stale connections. Optionally retry queries after reconnect. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3025 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 10:01:09 +00:00
Jeremy Kemper
9a2de028dc
Fix reconnect success rate to report as percentage. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 09:58:18 +00:00
Jeremy Kemper
090bfcec60
Correct documentation for Base.delete_all. References #1568 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 07:41:17 +00:00
Jeremy Kemper
d28e9aef5f
Oracle: test case for column default parsing. References #2788 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 04:51:54 +00:00
Jeremy Kemper
d8f5ccab1c
Update documentation for Migrations. References #2861 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-14 03:51:39 +00:00
Jeremy Kemper
6201679f1a
Reapply [2942] which was elided by [2997]. References #2788 . References #2848 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 22:46:14 +00:00
Jeremy Kemper
4a5b042fc7
r3046@asus: jeremy | 2005-11-13 02:31:21 -0800
...
AbstractAdapter#reconnect_if_inactive! returns boolean success. AbstractAdapter#log alters exception message on reconnect failure rather than raising ConnectionFailed.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 10:32:17 +00:00
Jeremy Kemper
680e4742be
r3042@asus: jeremy | 2005-11-13 01:51:08 -0800
...
MySQL active? and reconnect! References #428 .
r3043@asus: jeremy | 2005-11-13 01:58:28 -0800
SQLite active? and reconnect! References #428 .
r3044@asus: jeremy | 2005-11-13 02:02:27 -0800
Update CHANGELOG with admonishment regarding avoidance of the log method.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3001 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 10:03:03 +00:00
Jeremy Kemper
44b64704dd
r3032@asus: jeremy | 2005-11-12 23:16:52 -0800
...
Ticket 428 - stale connections
r3040@asus: jeremy | 2005-11-13 00:22:29 -0800
When AbstractAdapter#log rescues an exception, attempt to detect and reconnect to an inactive database connection. Connection adapter must respond to the active? and reconnect! instance methods. Initial support for PostgreSQL. References #428 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 08:23:07 +00:00
Jeremy Kemper
a762939894
PostgreSQL: last_insert_id uses select_value rather than using @connection.exec directly.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 08:09:37 +00:00
Jeremy Kemper
068d9ef0ef
Much faster Oracle column reflection. References #2848 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2996 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 07:24:50 +00:00
Jeremy Kemper
077ae340e8
r4331@asus: jeremy | 2005-11-12 17:03:45 -0800
...
PostgreSQL: default_sequence_name falls back to 'id' pk if both the given pk and discovered pk are nil.
r4336@asus: jeremy | 2005-11-12 22:31:39 -0800
PostgreSQL: correct the sequence discovery fallback query. References #2594 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2994 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 06:32:54 +00:00