aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #15237 from sgrif/sg-move-extract-scaleRafael Mendonça França2014-05-213-6/+5
|\ \ | | | | | | Move extract_scale to decimal type
| * | Move extract_scale to decimal typeSean Griffin2014-05-213-6/+5
| | | | | | | | | | | | | | | | | | The only type that has a scale is decimal. There's a special case where decimal columns with 0 scale are type cast to integers if the scale is not specified. Appears to only affect schema dumping.
* | | Merge pull request #15218 from sgrif/sg-move-oid-typesRafael Mendonça França2014-05-2123-353/+532
|\ \ \ | | | | | | | | Move PG OID types to their own files
| * | | Move PG OID types to their own filesSean Griffin2014-05-2123-353/+532
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As we promote these classes to first class concepts, these classes are starting to gain enough behavior to warrant being moved into their own files. Many of them will become quite large as we move additional behavior to the type objects.
* | | | Rename `oid_type` to `cast_type` to make PG columns consistentSean Griffin2014-05-211-5/+4
| |/ / |/| |
* | | Add missing nodocs to MySQL adapterSean Griffin2014-05-211-3/+3
|/ /
* | push `extract_scale` to the `Type`.Yves Senn2014-05-214-7/+9
| | | | | | | | | | | | | | - `extract_precision`, `extract_limit`, and `extract_default` probably need to follow. - would be good to remove the delegation `Column#extract_scale`. /cc @sgrif
* | Delegate `klass` to the injected type objectSean Griffin2014-05-209-14/+33
| |
* | Delegate `type_cast_for_write` to injected type objectSean Griffin2014-05-204-30/+14
| |
* | Merge pull request #15207 from sgrif/sg-inline-column-helpersRafael Mendonça França2014-05-208-118/+74
|\ \ | | | | | | Inline typecasting helpers from Column to the appropriate types
| * | Inline typecasting helpers from Column to the appropriate typesSean Griffin2014-05-208-118/+74
| | |
* | | Merge pull request #15206 from sgrif/sg-type-map-postgresqlRafael Mendonça França2014-05-203-45/+31
|\ \ \ | | | | | | | | Use the generic type map for PostgreSQL OID registrations
| * | | Use the generic type map for PostgreSQL OID registrationsSean Griffin2014-05-203-45/+31
| |/ /
* / / Delegate predicate methods to injected type object on ColumnSean Griffin2014-05-2011-23/+43
|/ /
* | Use the generic type map object for mysql field lookupsSean Griffin2014-05-203-23/+26
| |
* | Merge pull request #15203 from sgrif/sg-delegate-type-castRafael Mendonça França2014-05-206-74/+6
|\ \ | | | | | | Replace `type_cast` case statement with delegation
| * | Replace `type_cast` case statement with delegationSean Griffin2014-05-206-74/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #15201 from sgrif/sg-types-postgresqlRafael Mendonça França2014-05-203-147/+81
|\ \ \ | | | | | | | | Have Postgres OID types inherit from general types
| * | | Have Postgres OID types inherit from general typesSean Griffin2014-05-203-147/+81
| | | | | | | | | | | | | | | | | | | | Using general types where possible. Several more can go away once infinity gets figured out.
* | | | Use general types for mysql fieldsSean Griffin2014-05-201-69/+11
| |/ / |/| |
* | | Delegate type_cast to injected type object in mysqlSean Griffin2014-05-206-53/+72
|/ /
* | Delegate `#type_cast` to injected type objects on SQLite3Sean Griffin2014-05-2010-6/+82
| |
* | Remove :timestamp column typeSean Griffin2014-05-199-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-1921-71/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #14126 from schuetzm/index_option_for_columnRafael Mendonça França2014-05-191-6/+13
|\ \ | | | | | | Make `:index` in migrations work with all column types
| * | Make `:index` in migrations work with all column typesMarc Schütz2014-05-181-6/+13
| | |
* | | pg, re-introduce `PostgreSQL::Utils` to unify schema/table extraction.Yves Senn2014-05-194-24/+31
| | | | | | | | | | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425
* | | pg, add missing nodocs for extracted modules.Yves Senn2014-05-195-10/+10
| | |
* | | Merge pull request #15156 from sgrif/sg-postgres-timestampsYves Senn2014-05-181-6/+3
|\ \ \ | |/ / |/| | PostgreSQL timestamps should always be datetimes
| * | PostgreSQL timestamps are always datetimesSean Griffin2014-05-171-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | The current behavior is that they are treated as `datetime` normally, but if they are part of an array, they are treated as `timestamp`. The only place that seems to be impacted by this is schema dumping, which shouldn't matter since `t.datetime` and `t.timestamp` are equivalent in the `PostgreSQL` adapter, anyway.
* | | Add a type object to Column constructorSean Griffin2014-05-179-12/+40
| | | | | | | | | | | | | | | | | | 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`.
* | | Remove dead test code for unsupported adaptersSean Griffin2014-05-171-9/+0
|/ /
* | Changed extract_limit in class Column to return correct mysql float and ↵Aaron Nelson2014-05-161-0/+2
| | | | | | | | double limits
* | :scissors:Rafael Mendonça França2014-05-143-4/+0
| |
* | Methods of these modules are internalRafael Mendonça França2014-05-142-14/+14
| | | | | | | | | | They should not be used on people application so they should not be present on the API documentation.
* | PostgreSQLAdapter::Utils seems to be only used from a single spot - quite ↵kares2014-05-142-20/+19
| | | | | | | | redundant
* | move PostgreSQL's DatabaseStatements out of the PostgreSQLAdapter name-spacekares2014-05-142-7/+7
| |
* | PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC)kares2014-05-142-8/+7
| |
* | introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC)kares2014-05-147-15/+21
| | | | | | ... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies
* | Merge pull request #15092 from kares/pg-array-parserRafael Mendonça França2014-05-132-27/+27
|\ \ | | | | | | [postgres] include PgArrayParser directly
| * | [postgres] include PgArrayParser directly and only load/include ArrayParser ↵kares2014-05-132-27/+27
| | | | | | | | | | | | if not found
* | | extract pg type map initialization process to `TypeMapInitializer`.Yves Senn2014-05-132-65/+74
|/ /
* | pg, `change_column_default` accepts `[]`. Closes #11586.Yves Senn2014-05-122-2/+3
| |
* | pg, map `char` and `name` types as string. [dark-panda & Yves Senn]Yves Senn2014-05-121-0/+1
| | | | | | | | Closes #10802.
* | pg, fix Infinity and NaN values conversion.Innokenty Mihailov2014-05-121-3/+8
| | | | | | | | Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
* | Handle other pk types in PostgreSQL gracefully.Patrick Robertson2014-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In #10410 it was noted that you can no longer create PK's with the type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly because the newer adapter is checking for column type with the id column instead of just letting it pass through like it did before. Side effects: You may just create a PK column of a type that you really don't want to be your PK. As far as I can tell this was allowed in 3.2.X and perhaps an exception should be raised if you try and do something extremely dumb.
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-05-102-0/+5
|\ \
| * | copy edits [ci skip]Vijay Dev2014-05-081-1/+1
| | |
| * | [ci skip] document type_cast_for_writeschneems2014-05-072-0/+5
| | |
* | | Convert column name to string only onceKuldeep Aggarwal2014-05-041-1/+2
| | |