Commit Graph

781 Commits

Author SHA1 Message Date
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
Jeremy Kemper
54dfb29151 PostgreSQL: min_messages = warning for AR tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 22:28:38 +00:00
Jeremy Kemper
7c8f3edc99 r4325@asus: jeremy | 2005-11-12 03:57:46 -0800
PostgreSQL: correctly discover custom primary key sequences.  PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence.  Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing).  Base.define_attr_method allows nil values.  References #2594.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 11:59:54 +00:00
Jamis Buck
7321a41e1b Make Validations#create! use the current scope
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 05:09:05 +00:00
Jeremy Kemper
047c75fa06 SQLServer: don't report limits for unsupported field types. Closes #2835.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2982 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-11 23:45:02 +00:00
Jeremy Kemper
ae6a513bd1 Include the Enumerable module in ActiveRecord::Errors.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2981 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-11 18:49:01 +00:00
Jeremy Kemper
80b8b76091 Update docs for AR::Base#clone.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 18:53:31 +00:00
Jeremy Kemper
3309268120 Add :group option, correspond to GROUP BY, to the find method and to the has_many association. Closes #2818.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 16:36:01 +00:00
Jamis Buck
df5c74cc7c Make sure the acts_as_list_class is resolved relative to the global namespace
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2971 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 15:59:00 +00:00
Jeremy Kemper
df7a087c76 Don't cast nil or empty strings to a dummy date. Closes #2789.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 06:56:01 +00:00
Jeremy Kemper
c91088cd13 Expand tabs and strip trailing whitespace.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 06:24:33 +00:00
Jeremy Kemper
b84a7beb98 acts_as_list plays nicely with inheritance by remembering the class which declared it. Closes #2811.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 06:19:50 +00:00
Nicholas Seckar
c955f378de Fix sqlite adaptor's detection of missing dbfile or database declaration
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-10 00:16:23 +00:00
David Heinemeier Hansson
bc7ec23f4e Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 12:50:35 +00:00
Florian Weber
e6f412def3 Allow capital letters in the email address in the the validates_format_of example
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2950 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 10:38:48 +00:00
Jeremy Kemper
44591ffb71 r3886@sedna: jeremy | 2005-11-07 03:09:59 -0800
r3944@sedna:  jeremy | 2005-11-09 01:29:56 -0800
 Upgrade bundled ruby-mysql 0.2.4 with mysql411 shim (see #440) to ruby-mysql0.2.6 with a patchset for 4.1 protocol support.  Local change [301] is now apart of the main driver; reapplied local change [2182].  Removed GC.start fromResult.free.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2947 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 06:43:40 +00:00
Jeremy Kemper
97f418ce02 Correct handling of complex order clauses with SQL Server limit emulation. Closes #2770.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 21:39:13 +00:00
Jeremy Kemper
86aaa6e988 Correct whitespace problem in Oracle default column value parsing. Closes #2788.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 19:11:25 +00:00
Jeremy Kemper
35b4bdcff0 Destroy associated has_and_belongs_to_many records after all before_destroy callbacks but before destroy. This allows you to act on the habtm association as you please while preserving referential integrity. Closes #2065.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 10:19:09 +00:00
Jeremy Kemper
c54b51fa7e Deprecate the old, confusing :exclusively_dependent option in favor of :dependent => :delete_all.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 08:41:34 +00:00
Jeremy Kemper
a90fdec031 More compatible Oracle column reflection. Closes #2771.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 04:37:22 +00:00
Jeremy Kemper
5298f730bb Add :order option to Author.posts_with_comments_and_categories so that tests which assume implicit id order pass with database which do not provide it. Scrubbed whitespace.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 04:36:37 +00:00
David Heinemeier Hansson
cd2b9a9498 Made ready for 0.14.3 (RC4)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 19:40:27 +00:00
David Heinemeier Hansson
5132170c72 Fixed faulty regex in get_table_name method (SQLServerAdapter) (closes #2639) [Ryan Tomayko]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 09:54:28 +00:00
David Heinemeier Hansson
6ab9f2bb40 Fix READMEs (closes #2680) [coffee2code]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 09:51:47 +00:00