aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/datatype_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Schema dumping support for PostgreSQL oid typeRyuta Kamizono2017-02-121-1/+1
| | | | Closes #27980
* Schema dumping support for PostgreSQL interval typeRyuta Kamizono2017-02-121-2/+2
| | | | Closes #27979
* Refactor `ColumnDefinition` to contain `options` hashRyuta Kamizono2017-02-091-2/+2
| | | | | | Column options are passed as an hash args then used as `options` hash in `add_column_options!`. Converting args to attributes is inconvinient for using options as an hash.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* make it possible to run AR tests with bin/testYves Senn2015-06-111-2/+2
|
* Closes rails/rails#18864: Renaming transactional fixtures to transactional testsBrandon Weiss2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I’m renaming all instances of `use_transcational_fixtures` to `use_transactional_tests` and “transactional fixtures” to “transactional tests”. I’m deprecating `use_transactional_fixtures=`. So anyone who is explicitly setting this will get a warning telling them to use `use_transactional_tests=` instead. I’m maintaining backwards compatibility—both forms will work. `use_transactional_tests` will check to see if `use_transactional_fixtures` is set and use that, otherwise it will use itself. But because `use_transactional_tests` is a class attribute (created with `class_attribute`) this requires a little bit of hoop jumping. The writer method that `class_attribute` generates defines a new reader method that return the value being set. Which means we can’t set the default of `true` using `use_transactional_tests=` as was done previously because that won’t take into account anyone using `use_transactional_fixtures`. Instead I defined the reader method manually and it checks `use_transactional_fixtures`. If it was set then it should be used, otherwise it should return the default, which is `true`. If someone uses `use_transactional_tests=` then it will overwrite the backwards-compatible method with whatever they set.
* tests, extract pg number tests into separate file.Yves Senn2014-12-021-35/+1
|
* pg tests, get rid of `sql_types_test.rb`.Yves Senn2014-11-071-0/+7
|
* test pg, move bit string type tests into `bit_string_test.rb`.Yves Senn2014-06-031-34/+1
|
* pg test, extract tsvector tests into `postgresql/full_text_test.rb`Yves Senn2014-05-221-27/+1
|
* pg test, move timestamp tests over to `postgresql/timestamp_test.rb`.Yves Senn2014-05-221-32/+1
|
* pg test, extract network address type tests into separate file.Yves Senn2014-05-221-50/+1
|
* pg test, remove unused code.Yves Senn2014-05-221-3/+0
|
* pg, extract money tests into separate file.Yves Senn2014-05-211-35/+1
| | | | | - Added assertions about the column. Specifically scale. - Move record insertion from setup into test method.
* remove warning `ambiguous first argument; put parentheses or even spaces`Kuldeep Aggarwal2014-05-151-1/+1
|
* test, move all pg array tests into `postgresql/array_test.rb`.Yves Senn2014-05-131-46/+1
|
* test, use `columns_hash[]` in place of `columns.find {}`.Yves Senn2014-05-121-1/+1
|
* pg, map `char` and `name` types as string. [dark-panda & Yves Senn]Yves Senn2014-05-121-0/+23
| | | | Closes #10802.
* pg, fix Infinity and NaN values conversion.Innokenty Mihailov2014-05-121-0/+7
| | | | Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
* 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.
* move PostgreSQL UUID tests from `datatype_test.rb` to `uuid_test.rb`.Yves Senn2014-02-261-16/+1
|
* Correctly escape PostgreSQL arrays.Aaron Patterson2014-02-181-0/+8
| | | | | | Thanks Godfrey Chan for reporting this! Fixes: CVE-2014-0080
* extract PG range tests from datatype_test.rb into range_test.rbYves Senn2013-12-131-282/+0
|
* Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-191/+174
| | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* prevent global timezone state from leaking out of test cases.Yves Senn2013-10-251-25/+15
|
* PG adapter deals with negative money values formatted with parenthesis.Yves Senn2013-08-261-0/+8
| | | | Closes #11899.
* Merge pull request #11574 from jetthoughts/11552_rescue_on_invalid_inet_assignYves Senn2013-08-141-0/+14
|\ | | | | Fix assign ip address with invalid values raise exception
| * Rescue invalid ip address exceptions on assign.Paul Nikitochkin2013-08-141-0/+14
| | | | | | | | In order that set attribute should not be bang method
* | Removed redundant asserts for assigns attribute operationPaul Nikitochkin2013-08-141-28/+28
|/
* fix for postgresql failing test in localKarunakar (Ruby)2013-08-041-1/+1
|
* cleanup, switch arguments in assert_equal callsYves Senn2013-05-081-29/+29
|
* Squashed commit of the following:Aaron Patterson2013-05-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2683de5da85135e8d9fe48593ff6167db9d64b18 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:29:20 2013 -0700 cannot support infinite ranges right now commit cebb6acef2c3957f975f6db4afd849e535126253 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:26:12 2013 -0700 reverting infinity comparison commit 385f7e6b4efd1bf9b89e8d607fcb13e5b03737ea Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:23:28 2013 -0700 Revert "Added ability to compare date/time with infinity" This reverts commit 38f28dca3aa16efd6cc3af6453f2e6b9e9655ec1. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/core_ext/numeric/infinite_comparable.rb activesupport/test/core_ext/date_ext_test.rb activesupport/test/core_ext/date_time_ext_test.rb activesupport/test/core_ext/numeric_ext_test.rb activesupport/test/core_ext/time_ext_test.rb activesupport/test/core_ext/time_with_zone_test.rb commit 0d799a188dc12b18267fc8421675729917610047 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:53 2013 -0700 Revert "Refactor infinite comparable definition a bit" This reverts commit dd3360e05e4909f2f0c74a624cccc2def688f828. commit 42dec90e49745bbfae546f0560b8783f6b48b074 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:47 2013 -0700 Revert "Require 'active_support/core_ext/module/aliasing' in the infinite_comparable module" This reverts commit 7003e71c13c53ec3d34250560fbf80b8381df693.
* Fix #7619. 0x prefix must be added when assigning hexadecimal string into ↵kennyj2013-04-171-1/+7
| | | | bit column in Postgresql, because solving ambiguity.
* Revert "fixing bit string test"kennyj2013-04-161-3/+3
| | | | | | This reverts commit cdd293cb963b895ff580eb20d10f5d56ecb3d447. Reason: This wasn't properly fix.
* Fix PostgreSQL TIMESTAMP WITH TIME ZONE to return ActiveSupport::TimeTroy Kruthoff2013-03-011-0/+2
| | | | | | | | | | In an AR model a timestamptz attribute would return a ruby string and AR tests did not check for any type casting. Previous tests would pass only because an assert_equal was being used on a Time.utc object, which will parse the right side of the eq to a valid Time instance for comparision. switch to test instance of Time instead of ActiveSupport::TimeWithZone
* fixing bit string testAaron Patterson2013-02-101-3/+3
|
* Fix PostgreSQL tests on TravisAndrew White2013-01-241-10/+31
| | | | Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
* Add postgresql range types supportbUg2013-01-231-0/+281
|
* Reset test data, and fix bug that the inserted data were not actually selectedAkira Matsuda2013-01-081-11/+16
|
* Use better variable names for ltree tests, remove instance variableCarlos Antonio da Silva2013-01-051-0/+1
|
* Support for PostgreSQL's ltree data type.Rob Worley2013-01-041-1/+3
|
* Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* postgres, map scaled intervals to string datatype (#7518)Yves Senn2012-09-061-1/+3
|
* Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-141-0/+15
|
* Removes NetAddr dependencyDan McClain2012-05-081-3/+4
|
* Converts inet and cidr columns to NetAddr::CIDRDan Seaver2012-05-071-4/+6
|