Commit Graph

3508 Commits

Author SHA1 Message Date
kennyj
7f14508eef Fix warning: The method name is a duplicate and wrong. 2012-02-11 23:27:14 +09:00
Aaron Patterson
c50cb4aa39 PG column consults oid types when typecasting 2012-02-10 16:06:39 -08:00
Aaron Patterson
f7b915b507 Merge branch 'joelhoffman-postgres_schema_builder' into instance_reader
* joelhoffman-postgres_schema_builder:
  Also support writing the hstore back to the database
  Hstore values are all strings
  string_to_hstore / hstore_to_string, serializing
  don't test schema where hstore not installed
  schema dumper tests for hstore
  Additional hstore tests, supporting null values, better compliance with postgres docs
  add hstore to postgres native types and defaults

Conflicts:
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2012-02-10 10:55:34 -08:00
Aaron Patterson
522b72fd28 Merge branch 'master' into instance_reader
* master:
  Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
  make Range#overlaps? accept Range of Time
  improved test case for partial indices
  Made schema dumper recognize partial indices' where statements
  Added where option to add_index to support postgresql partial indices
2012-02-10 10:41:24 -08:00
Aaron Patterson
3092324ef4 Merge pull request #4956 from mhfs/pg_partial_indices
Add support for partial indices to PostgreSQL adapter
2012-02-10 10:23:42 -08:00
Aaron Patterson
e0eef111a3 typecast columns based on the returned types 2012-02-09 14:42:39 -08:00
Aaron Patterson
e0cba3a0fa Merge branch 'master' into instance_reader
* master: (30 commits)
  Bump tzinfo. 0.3.31 was released on November 6, 2011.
  Fix GH #4909. Dependency on TZInfo move from AR to AS.
  moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one
  Refactored the OrderedHash related stuff
  Replaced OrderedHash usage with Ruby 1.9 Hash
  Replaced OrderedHash with Hash for ruby 1.9 series
  removed unnecessary code
  replacing the orderhash with hash for ruby-1.9
  Clean up some wording.
  Fix typo.
  test title changed corresponding to the test
  replaced active support ordered hash to ruby hash on active resource
  PostgreSQL does not work in the same way of the other adapters
  AR::Relation#pluck: improve to work with joins
  Fix match docs
  Fix attribute_before_type_cast for serialized attributes. Fixes #4837.
  Fix failing request test
  Fixes in AMo README
  Update README to mention lint.
  Trim down Active Model API by removing valid? and errors.full_messages
  ...
2012-02-09 13:50:08 -08:00
Aaron Patterson
6c50c07d8d fixing the list of cached columns 2012-02-09 13:49:24 -08:00
Marcelo Silveira
aaffc2acd5 improved test case for partial indices 2012-02-09 19:04:07 -02:00
Aaron Patterson
f26fcc05f6 only exclude serialized columns from cacheable columns 2012-02-09 12:08:07 -08:00
Karunakar (Ruby)
fcbe18d9b5 moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one 2012-02-09 18:37:20 +05:30
Joel
2dd0178229 Also support writing the hstore back to the database 2012-02-08 22:28:51 -08:00
Joel
b04880cecc string_to_hstore / hstore_to_string, serializing 2012-02-08 22:28:51 -08:00
Joel
2967aecdaf don't test schema where hstore not installed 2012-02-08 22:28:51 -08:00
Joel
102ef98d32 schema dumper tests for hstore 2012-02-08 22:28:51 -08:00
Joel
cf57211460 Additional hstore tests, supporting null values, better compliance with postgres docs 2012-02-08 22:28:51 -08:00
Marcelo Silveira
7ef22fce7c Made schema dumper recognize partial indices' where statements 2012-02-09 03:28:11 -02:00
Marcelo Silveira
d70e0236df Added where option to add_index to support postgresql partial indices
The `add_index` method now supports a `where` option that receives a
string with the partial index criteria.

    add_index(:accounts, :code, :where => "active")

    Generates

    CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
2012-02-09 01:20:52 -02:00
Rafael Mendonça França
78a6b6a5fd PostgreSQL does not work in the same way of the other adapters 2012-02-08 16:38:31 -02:00
Bogdan Gusiev
a379cb2fb5 AR::Relation#pluck: improve to work with joins 2012-02-08 16:37:27 +02:00
Jon Leighton
75ffd8701d Fix attribute_before_type_cast for serialized attributes. Fixes #4837. 2012-02-07 23:36:22 +00:00
Aaron Patterson
15b0dcd517 postgresql correctly typecasts back to Ruby, so change assertions 2012-02-07 14:13:45 -08:00
Aaron Patterson
dd1eb78d76 column_types hash is used for doing typecasting 2012-02-07 13:51:53 -08:00
Aaron Patterson
9bcb9cd55f column types are passed from the result set to the instantiated AR object 2012-02-07 13:51:52 -08:00
Xavier Noria
1e5cdbddfc let automatic EXPLAIN ignore CACHE notifications 2012-02-03 16:10:39 -08:00
Jeremy Kemper
33514a173c Get ActiveRecord::TestCase back on its feet, despite deprecation. It requires SQLCounter which was moved to AR internal tests only. 2012-02-05 23:09:09 -07:00
Aaron Patterson
2abaa19e77 Merge pull request #4856 from ihid/store_null_bug
Allow store to be a not null column.
2012-02-02 12:07:28 -08:00
Jeremy Walker
58d10e2012 Allow store to be a not null column. 2012-02-02 18:57:15 +00:00
Rafael Mendonça França
37ce852c51 columns method doesn't have name argument 2012-02-02 16:08:31 -02:00
Sebastian Martinez
dcd74eb519 Remove useless argument in #columns. 2012-02-02 10:34:17 -02:00
Jon Leighton
66fc1d6ac8 Merge pull request #4543 from jdelStrother/find_or_init
Don't instantiate two objects in collection proxy / find_or_instantiate_by
2012-02-01 15:15:29 -08:00
Rafael Mendonça França
9b1d54e292 Fix typo 2012-02-01 17:14:00 -02:00
Rafael Mendonça França
a73662f3d8 Use human attribute name to show the dependent destroy message 2012-02-01 17:03:15 -02:00
José Valim
403cce77f1 Merge pull request #4828 from railsaholic/fix_error_message
fix has_one, has_many restrict error message
2012-02-01 10:43:40 -08:00
Aaron Patterson
6da8ec14c5 Merge pull request #4806 from KL-7/do-not-serialize-nil
Do not serialize nil in serialized attribute.
2012-02-01 10:39:03 -08:00
Aaron Patterson
78d5d6f868 Merge pull request #4809 from cfeist/feist-sqlite-binary-corruption
Fix for SQLite binary data corrupter (to master branch)
2012-02-01 10:38:26 -08:00
Manoj
907d19343e fix has_one, has_many restrict error message 2012-02-01 23:58:20 +05:30
Vijay Dev
5850ea0560 fix a typo [ci skip] 2012-02-01 23:31:43 +05:30
Chris Feist
96359d557d Added test to illustrate bad binary blobs. 2012-01-31 13:45:00 -06:00
Aaron Patterson
c4469e6c39 Revert "Merge pull request #4746 from jenslukowski/issue4718"
This reverts commit 5cad7a0dba652f3e942e58087bc88ba5c5390edc, reversing
changes made to bb842e8d2111e50b21a14b8bd6d89371a4b9cd68.
2012-01-31 11:34:15 -08:00
Jon Leighton
75de1ce131 Merge pull request #4805 from xuanxu/none_and_null_object_pattern
Added `none` query method to return zero records.
2012-01-31 11:17:02 -08:00
Kirill Lashuk
39cb1bedb8 Do not serialize nil in serialized attribute. 2012-01-31 22:07:09 +03:00
Aaron Patterson
d9c48626f9 Merge pull request #4742 from petervandenabeele/master
Set the timezone correctly for a test in activerecord/../base_test.rb
2012-01-31 10:55:00 -08:00
Aaron Patterson
5cad7a0dba Merge pull request #4746 from jenslukowski/issue4718
Test and fix for issue 4718
2012-01-31 10:53:16 -08:00
Juanjo Bazán
8270e4a8ce Added none query method to return zero records.
And added NullRelation class implementing the null object pattern for the `Relation` class.
2012-01-31 19:50:09 +01:00
José Valim
3bf859daf6 Merge pull request #4791 from gregolsen/reflection_test_fixed
reflection test fixed
2012-01-31 08:45:01 -08:00
Rafael Mendonça França
f944d528c4 Remove deprecation warnings from tests 2012-01-31 14:22:58 -02:00
gregolsen
b00a5e6e51 test_get_ids_for_ordered_association fixed 2012-01-31 18:16:48 +02:00
gregolsen
58cd0085a9 reflection test fixed 2012-01-31 15:57:39 +02:00
Jon Leighton
98e1735d1d Merge pull request #4783 from gregolsen/ids_reader_fix
ids_reader method fixed, test added to has_many association (for PostgreSQL)
2012-01-31 05:47:41 -08:00