Commit Graph

403 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
49c801b71d Added :include as an option for association declarations [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 20:39:34 +00:00
David Heinemeier Hansson
c8dd66fdcd Made association extensions use simpler block syntax
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 19:05:42 +00:00
Jeremy Kemper
390e6d246c r2915@asus: jeremy | 2005-11-06 05:02:53 -0800
Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints.  Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 10:18:51 +00:00
David Heinemeier Hansson
6c5572701a Fixed that SQL Server should ignore :size declarations on anything but integer and string in the agnostic schema representation (closes #2756) [Ryan Tomayko]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 07:48:24 +00:00
David Heinemeier Hansson
a5a82d978b Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH] Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH] Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-04 19:39:50 +00:00
Jeremy Kemper
4506a463e4 Omit internal dtproperties table from SQLServer table list. Closes #2729.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-04 06:01:03 +00:00
Jeremy Kemper
427300e08f Quote column names in generated SQL. Closes #2728.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-04 01:49:10 +00:00
Jeremy Kemper
189b7907d5 Correct the pure-Ruby MySQL 4.1.1 shim's version test. Closes #2718.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 21:17:32 +00:00
Jeremy Kemper
44d1420757 Add Model.create! to match existing model.save! method. When save! raises RecordInvalid, you can catch the exception, retrieve the invalid record (invalid_exception.record), and see its errors (invalid_exception.record.errors).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 18:54:16 +00:00
Jeremy Kemper
e024f2f1bf Correct fixture behavior when table name pluralization is off. Closes #2719.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 15:43:48 +00:00
David Heinemeier Hansson
8c512a1caf Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 09:06:42 +00:00
Jeremy Kemper
c827b3f15c A missing primary key column shouldn't raise an error when generating its error message.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2837 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-01 18:21:46 +00:00
David Heinemeier Hansson
c21fdf31a5 Changed :dbfile to :database for SQLite adapter for consistency (old key still works as an alias) (closes #2644) [Dan Peterson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-30 08:10:04 +00:00
David Heinemeier Hansson
68160b3485 Added migration support for Oracle (closes #2647) [Michael Schoen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-29 18:40:49 +00:00
Jeremy Kemper
14b60fc074 Worked around that connection can't be reset if allow_concurrency is off. Closes #2648.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-29 18:17:13 +00:00
David Heinemeier Hansson
e508595cf7 Fixed SQL Server adapter so it honors options[:conditions] when applying :limits (closes #1978) [Tom Ward] Fixed SQL Server adapter to pass even more tests and do even better (closes #2634) [rtomayko@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-28 09:20:05 +00:00
David Heinemeier Hansson
816f37a2ad Added migration support to SQL Server adapter (please someone do the same for Oracle and DB2) (closes #2625) [Tom Ward]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-28 07:40:28 +00:00
Jeremy Kemper
fb61912798 r3801@sedna: jeremy | 2005-10-28 00:42:28 -0700
Use AR::Base silencing rather than AR::Base.logger silencing in fixtures to preserve Log4r compatibility.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-28 04:53:35 +00:00
Jeremy Kemper
e7cd7e9d95 r3800@sedna: jeremy | 2005-10-28 00:39:05 -0700
Readonly constraints, association collection method_missing, dup constraint options


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-28 04:53:22 +00:00
David Heinemeier Hansson
beff664f2a Refactor DB exceptions and deal more with DB2 (closes #2624)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-27 08:18:41 +00:00
David Heinemeier Hansson
0b92d38c00 Added :offset and :limit to the kinds of options that Base.constrain can use (closes #2466) [duane.johnson@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 13:20:02 +00:00