aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/column.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use the type object for quoting PG RangesSean Griffin2014-07-051-4/+0
|
* Inline PG array type casting helperSean Griffin2014-06-101-18/+2
|
* Refactor serialized types to be partially defined as custom propertiesSean Griffin2014-05-291-4/+0
| | | | | | | Many of the methods defined in `AttributeMethods::Serialization` can be refactored onto this type as well, but this is a reasonable small step. Removes the `Type` class, and the need for `decorate_columns` to handle serialized types.
* Move parsing of PG sql strings for defaults out of columnSean Griffin2014-05-231-75/+4
|
* Push limit to type objectsSean Griffin2014-05-221-9/+0
| | | | | Columns and injected types no longer have any conditionals based on the format of SQL type strings! Hooray!
* Move `extract_precision` onto type objectsDan Croak and Sean Griffin2014-05-221-13/+0
|
* Rename `oid_type` to `cast_type` to make PG columns consistentSean Griffin2014-05-211-5/+4
|
* push `extract_scale` to the `Type`.Yves Senn2014-05-211-6/+0
| | | | | | | - `extract_precision`, `extract_limit`, and `extract_default` probably need to follow. - would be good to remove the delegation `Column#extract_scale`. /cc @sgrif
* Delegate `type_cast_for_write` to injected type objectSean Griffin2014-05-201-11/+0
|
* Delegate predicate methods to injected type object on ColumnSean Griffin2014-05-201-8/+0
|
* Replace `type_cast` case statement with delegationSean Griffin2014-05-201-7/+0
| | | | | | | | All subclasses of column were now delegating `type_cast` to their injected type object. We can remove the overriding methods, and generalize it on the `Column` class itself. This also enabled us to remove several column classes completely, as they no longer had any meaningful behavior of their own.
* Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-5/+0
| | | | | | | | | | | | | | | | The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
* Add a type object to Column constructorSean Griffin2014-05-171-2/+2
| | | | | | Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`.
* :scissors:Rafael Mendonça França2014-05-141-1/+0
|
* introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC)kares2014-05-141-2/+5
| | | ... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies
* [postgres] include PgArrayParser directly and only load/include ArrayParser ↵kares2014-05-131-2/+14
| | | | if not found
* copy edits [ci skip]Vijay Dev2014-05-081-1/+1
|
* [ci skip] document type_cast_for_writeschneems2014-05-071-0/+3
|
* PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-011-64/+1
| | | | | | | | | | | | | I ran the whole test suite and compared the old to the new types. Following is the list of types that did change with this patch: ``` DIFFERENT TYPE FOR mood: NEW: enum, BEFORE: DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float ``` The `floatrange` is a custom type. The old type `float` was simply a coincidence form the name `floatrange` and our type-guessing.
* refactor, put `PostgreSQLColumn` into `column.rb`.Yves Senn2014-03-311-0/+221
We have `connection_adapters/column.rb` so it's easier to remember that the column in in a separate file.