aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/connection_adapters/type
Commit message (Collapse)AuthorAgeFilesLines
* Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-142/+0
| | | | | `ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`
* Add test case for clear mappingsAkshay Vishnoi2014-05-281-0/+10
|
* Allow additional arguments to be used during type map lookupsSean Griffin2014-05-221-0/+17
| | | | | | | | Determining things like precision and scale in postgresql will require the given blocks to take additional arguments besides the OID. - Adds the ability to handle additional arguments to `TypeMap` - Passes the column type to blocks when looking up PG types
* Use the generic type map object for mysql field lookupsSean Griffin2014-05-201-0/+13
|
* Remove :timestamp column typeSean Griffin2014-05-191-2/+2
| | | | | | | | | | | | The `:timestamp` type for columns is unused. All database adapters treat them as the same database type. All code in `ActiveRecord` which changes its behavior based on the column's type acts the same in both cases. However, when the type is passed to code that checks for the `:datetime` type, but not `:timestamp` (such as XML serialization), the result is unexpected behavior. Existing schema definitions will continue to work, and the `timestamp` type is transparently aliased to `datetime`.
* Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-0/+102
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.