Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Merge pull request #15218 from sgrif/sg-move-oid-types | Rafael Mendonça França | 2014-05-21 | 23 | -353/+532 | |
|\ \ \ | | | | | | | | | Move PG OID types to their own files | |||||
| * | | | Move PG OID types to their own files | Sean Griffin | 2014-05-21 | 23 | -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 consistent | Sean Griffin | 2014-05-21 | 1 | -5/+4 | |
| |/ / |/| | | ||||||
* | | | Add missing nodocs to MySQL adapter | Sean Griffin | 2014-05-21 | 1 | -3/+3 | |
|/ / | ||||||
* | | push `extract_scale` to the `Type`. | Yves Senn | 2014-05-21 | 4 | -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 object | Sean Griffin | 2014-05-20 | 9 | -14/+33 | |
| | | ||||||
* | | Delegate `type_cast_for_write` to injected type object | Sean Griffin | 2014-05-20 | 4 | -30/+14 | |
| | | ||||||
* | | Merge pull request #15207 from sgrif/sg-inline-column-helpers | Rafael Mendonça França | 2014-05-20 | 8 | -118/+74 | |
|\ \ | | | | | | | Inline typecasting helpers from Column to the appropriate types | |||||
| * | | Inline typecasting helpers from Column to the appropriate types | Sean Griffin | 2014-05-20 | 8 | -118/+74 | |
| | | | ||||||
* | | | Merge pull request #15206 from sgrif/sg-type-map-postgresql | Rafael Mendonça França | 2014-05-20 | 3 | -45/+31 | |
|\ \ \ | | | | | | | | | Use the generic type map for PostgreSQL OID registrations | |||||
| * | | | Use the generic type map for PostgreSQL OID registrations | Sean Griffin | 2014-05-20 | 3 | -45/+31 | |
| |/ / | ||||||
* / / | Delegate predicate methods to injected type object on Column | Sean Griffin | 2014-05-20 | 11 | -23/+43 | |
|/ / | ||||||
* | | Use the generic type map object for mysql field lookups | Sean Griffin | 2014-05-20 | 3 | -23/+26 | |
| | | ||||||
* | | Merge pull request #15203 from sgrif/sg-delegate-type-cast | Rafael Mendonça França | 2014-05-20 | 6 | -74/+6 | |
|\ \ | | | | | | | Replace `type_cast` case statement with delegation | |||||
| * | | Replace `type_cast` case statement with delegation | Sean Griffin | 2014-05-20 | 6 | -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-postgresql | Rafael Mendonça França | 2014-05-20 | 3 | -147/+81 | |
|\ \ \ | | | | | | | | | Have Postgres OID types inherit from general types | |||||
| * | | | Have Postgres OID types inherit from general types | Sean Griffin | 2014-05-20 | 3 | -147/+81 | |
| | | | | | | | | | | | | | | | | | | | | Using general types where possible. Several more can go away once infinity gets figured out. | |||||
* | | | | Use general types for mysql fields | Sean Griffin | 2014-05-20 | 1 | -69/+11 | |
| |/ / |/| | | ||||||
* | | | Delegate type_cast to injected type object in mysql | Sean Griffin | 2014-05-20 | 6 | -53/+72 | |
|/ / | ||||||
* | | Delegate `#type_cast` to injected type objects on SQLite3 | Sean Griffin | 2014-05-20 | 10 | -6/+82 | |
| | | ||||||
* | | Remove :timestamp column type | Sean Griffin | 2014-05-19 | 9 | -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 object | Sean Griffin | 2014-05-19 | 21 | -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_column | Rafael Mendonça França | 2014-05-19 | 1 | -6/+13 | |
|\ \ | | | | | | | Make `:index` in migrations work with all column types | |||||
| * | | Make `:index` in migrations work with all column types | Marc Schütz | 2014-05-18 | 1 | -6/+13 | |
| | | | ||||||
* | | | pg, re-introduce `PostgreSQL::Utils` to unify schema/table extraction. | Yves Senn | 2014-05-19 | 4 | -24/+31 | |
| | | | | | | | | | | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425 | |||||
* | | | pg, add missing nodocs for extracted modules. | Yves Senn | 2014-05-19 | 5 | -10/+10 | |
| | | | ||||||
* | | | Merge pull request #15156 from sgrif/sg-postgres-timestamps | Yves Senn | 2014-05-18 | 1 | -6/+3 | |
|\ \ \ | |/ / |/| | | PostgreSQL timestamps should always be datetimes | |||||
| * | | PostgreSQL timestamps are always datetimes | Sean Griffin | 2014-05-17 | 1 | -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 constructor | Sean Griffin | 2014-05-17 | 9 | -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 adapters | Sean Griffin | 2014-05-17 | 1 | -9/+0 | |
|/ / | ||||||
* | | Changed extract_limit in class Column to return correct mysql float and ↵ | Aaron Nelson | 2014-05-16 | 1 | -0/+2 | |
| | | | | | | | | double limits | |||||
* | | :scissors: | Rafael Mendonça França | 2014-05-14 | 3 | -4/+0 | |
| | | ||||||
* | | Methods of these modules are internal | Rafael Mendonça França | 2014-05-14 | 2 | -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 ↵ | kares | 2014-05-14 | 2 | -20/+19 | |
| | | | | | | | | redundant | |||||
* | | move PostgreSQL's DatabaseStatements out of the PostgreSQLAdapter name-space | kares | 2014-05-14 | 2 | -7/+7 | |
| | | ||||||
* | | PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC) | kares | 2014-05-14 | 2 | -8/+7 | |
| | | ||||||
* | | introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC) | kares | 2014-05-14 | 7 | -15/+21 | |
| | | | | | | ... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies | |||||
* | | Merge pull request #15092 from kares/pg-array-parser | Rafael Mendonça França | 2014-05-13 | 2 | -27/+27 | |
|\ \ | | | | | | | [postgres] include PgArrayParser directly | |||||
| * | | [postgres] include PgArrayParser directly and only load/include ArrayParser ↵ | kares | 2014-05-13 | 2 | -27/+27 | |
| | | | | | | | | | | | | if not found | |||||
* | | | extract pg type map initialization process to `TypeMapInitializer`. | Yves Senn | 2014-05-13 | 2 | -65/+74 | |
|/ / | ||||||
* | | pg, `change_column_default` accepts `[]`. Closes #11586. | Yves Senn | 2014-05-12 | 2 | -2/+3 | |
| | | ||||||
* | | pg, map `char` and `name` types as string. [dark-panda & Yves Senn] | Yves Senn | 2014-05-12 | 1 | -0/+1 | |
| | | | | | | | | Closes #10802. | |||||
* | | pg, fix Infinity and NaN values conversion. | Innokenty Mihailov | 2014-05-12 | 1 | -3/+8 | |
| | | | | | | | | Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`. | |||||
* | | Handle other pk types in PostgreSQL gracefully. | Patrick Robertson | 2014-05-12 | 1 | -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/docrails | Vijay Dev | 2014-05-10 | 2 | -0/+5 | |
|\ \ | ||||||
| * | | copy edits [ci skip] | Vijay Dev | 2014-05-08 | 1 | -1/+1 | |
| | | | ||||||
| * | | [ci skip] document type_cast_for_write | schneems | 2014-05-07 | 2 | -0/+5 | |
| | | | ||||||
* | | | Convert column name to string only once | Kuldeep Aggarwal | 2014-05-04 | 1 | -1/+2 | |
| | | | ||||||
* | | | Use the reader attribute rather than the instance var when possible | Carlos Antonio da Silva | 2014-05-04 | 1 | -2/+2 | |
| | | | ||||||
* | | | Simplify building options hash in rename column method for mysql | Carlos Antonio da Silva | 2014-05-04 | 1 | -5/+6 | |
| | | |