aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/geometric_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Call the new point behavior `:point`, not `:rails_5_1_point`Sean Griffin2015-12-171-4/+4
| | | | | Since the attributes API is new in Rails 5, we don't actually need to keep the behavior of `attribute :point`, as it's not a breaking change.
* remove warning from postgresql geometric testyuuji.yaginuma2015-12-051-1/+3
| | | | | | | | This removes the following warning which has been out in the case of a PostgreSQL 9.3 below. ``` activerecord/test/cases/adapters/postgresql/geometric_test.rb:265: warning: instance variable @connection not initialized ```
* Add schema dumping support for PostgreSQL geometric data typesRyuta Kamizono2015-11-241-5/+61
|
* Move `migration/postgresql_geometric_types_test.rb` in ↵Ryuta Kamizono2015-11-241-0/+84
| | | | `adapters/postgresql/geometric_test.rb`
* make it possible to run AR tests with bin/testYves Senn2015-06-111-2/+2
|
* Return a `Point` object from the PG Point typeSean Griffin2015-06-051-11/+108
| | | | | | | | | | | | | | | | | | | This introduces a deprecation cycle to change the behavior of the default point type in the PostgreSQL adapter. The old behavior will continue to be available for the immediate future as `:legacy_point`. The current behavior of returning an `Array` causes several problems, the most significant of which is that we cannot differentiate between an array of points, and a point itself in the case of a column with the `point[]` type. The attributes API gives us a reasonable way to have a proper deprecation cycle for this change, so let's take advantage of it. If we like this change, we can also add proper support for the other geometric types (line, lseg, box, path, polygon, and circle), all of which are just aliases for string today. Fixes #20441
* Prefer `drop_table if_exists: true` over raw SQLRyuta Kamizono2015-02-181-2/+2
| | | | | Lowercase raw SQL has been replaced by 07b659c already. This commit replaces everything else of raw SQL.
* rm `Type#number?`Sean Griffin2015-02-071-1/+0
| | | | | This predicate is only used in `query_attribute`, and is relatively easy to remove without adding a bunch of is a checks.
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
| | | | onwards.
* Remove most type related predicates from `Column`Sean Griffin2015-01-301-2/+4
| | | | | | Remaining are `limit`, `precision`, `scale`, and `type` (the symbol version). These will remain on the column, since they mirror the options to the `column` method in the schema definition DSL
* Prefer `array?` rather than `array`Ryuta Kamizono2015-01-041-1/+1
| | | | | | Slightly refactoring `PostgreSQLColumn`. `array` should be readonly. `default_function` should be initialized by `super`. `sql_type` has been removed `[]`. Since we already choose to remove it we should not change.
* tests, move pg geometric tests out of `base_test`.Yves Senn2014-12-021-6/+73
|
* Remove the `text?` predicate from the type objectsSean Griffin2014-07-061-1/+0
| | | | | | | This was only used for uniqueness validations. The first usage was in conjunction with `limit`. Types which cast to string, but are not considered text cannot have a limit. The second case was only with an explicit `:case_sensitive => true` option given by the user.
* Merge pull request #15782 from sgrif/sg-column-defaultsMatthew Draper2014-06-181-4/+2
|\ | | | | Don't type cast the default on the column
| * Don't type cast the default on the columnSean Griffin2014-06-171-4/+2
| | | | | | | | | | | | | | If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
* | Detect in-place changes on point typesSean Griffin2014-06-171-0/+11
|/
* Revert "test pg, we don't care about the internal state of `column#default`."Yves Senn2014-06-031-0/+5
| | | | | | | | | | | | | | Revert "test pg, remove unused column assignments. Follow up to 254cdf47" Related to #15492 This reverts commit 254cdf4728291277f3fbaa854f34495030e476b4. This reverts commit 4bcf9029452e0c760af04faab6b549710401e8cf. There are public methods that assume `Column#default` is type casted. The return value of `Column#default` is publicly relevant and should not change. /cc @sgrif
* test pg, remove unused column assignments. Follow up to 254cdf47Yves Senn2014-06-031-3/+0
|
* test pg, we don't care about the internal state of `column#default`.Yves Senn2014-06-031-4/+0
| | | | | That data is internal to Active Record. What we care about is that new records have the right default value.
* pg, preserve point type when schema dumping.Yves Senn2014-06-031-8/+8
|
* pg test, examples for default values and schema dumping of point types.Yves Senn2014-06-031-0/+21
| | | | /cc @sgrif
* test pg, add basic test cases for point datatype.Yves Senn2014-06-021-0/+45