aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/array_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* fix bug on non empty defaults for pg array columnsLuke Steensen2014-03-301-0/+11
| | | | fixes #10613
* PostgreSQL, test-cases to lock down column default values.Yves Senn2014-03-281-0/+11
|
* PostgreSQL, test cases to lock the current column types.Yves Senn2014-03-281-0/+3
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* Fixes issue with parsing whitespace content back from database - fixes #13907Mauricio Linhares2014-02-011-0/+12
|
* Tidy up fix for PG extensions quotingCarlos Antonio da Silva2013-12-231-2/+6
| | | | | Always pass in the column for quote_bound_value and quote using it in case it exists there.
* Serialize postgres' hstore, json and array types correctly in AR update methods.Tadas Tamosauskas2013-12-231-0/+6
| | | | | | | | | Fixes #12261. Closes #12395. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/adapters/postgresql/array_test.rb activerecord/test/cases/adapters/postgresql/json_test.rb
* Do not consider PG array columns as number or text columnsCarlos Antonio da Silva2013-12-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | The code uses these checks in several places to know what to do with a particular column, for instance AR attribute query methods has a branch like this: if column.number? !value.zero? end This should never be true for array columns, since it would be the same as running [].zero?, which results in a NoMethodError exception. Fixing this by ensuring that array columns in PostgreSQL never return true for number?/text? checks. Since most of the array support was based on the postgres_ext lib, it's worth noting it does the same thing for numeric array columns too: https://github.com/dockyard/postgres_ext/blob/v1.0.0/lib/postgres_ext/active_record/connection_adapters/postgres_adapter.rb#L72 This extended the same logic for text columns to ensure consistency.
* fix quoting non-stringsDamien Mathieu2013-12-221-0/+6
| | | | Closes #13444
* Fix indent in PG array testsCarlos Antonio da Silva2013-12-191-5/+5
| | | | [ci skip]
* short arrays in inspectJan Bernacki2013-10-301-0/+5
|
* Fix multidimensional PG arrays containing non-string itemsYves Senn2013-08-071-14/+19
|
* test to express that we can't turn non-array columns to array columns.Yves Senn2013-08-061-0/+9
| | | | Closes #11062
* `change_column` for PG adapter respects `:array` option.Yves Senn2013-07-161-0/+12
|
* Fix loading of fixtures when the column type is a postgres array of strings.Chris Constantine2013-04-181-0/+6
| | | | - A string in an array of strings that has a quote char (') needs to have that quote char escaped if the array is getting wrapped in quote chars.
* Revert "Merge pull request #10043 from cconstantine/master"Rafael Mendonça França2013-04-181-6/+0
| | | | | | | This reverts commit 521035af530482d6d9ad2dae568eaeb0ab188e1c, reversing changes made to 222011dbee842bbc60d3aaaa3145356b90a30fd1. Reason: This broke the tests
* Fix loading of string arrays in postgresChris Constantine2013-04-081-0/+6
|
* Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-141-0/+98
Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter