1. 27 5月, 2014 2 次提交
  2. 23 5月, 2014 1 次提交
    • S
      Push limit to type objects · 11199051
      Sean Griffin 提交于
      Columns and injected types no longer have any conditionals based on the
      format of SQL type strings! Hooray!
      11199051
  3. 21 5月, 2014 1 次提交
    • S
      Replace `type_cast` case statement with delegation · e781aa31
      Sean Griffin 提交于
      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.
      e781aa31
  4. 20 5月, 2014 1 次提交
    • S
      Remove :timestamp column type · d0f8c46e
      Sean Griffin 提交于
      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`.
      d0f8c46e
  5. 19 5月, 2014 1 次提交
    • S
      Delegate `Column#type` to the injected type object · 0b682e4b
      Sean Griffin 提交于
      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.
      0b682e4b
  6. 18 5月, 2014 1 次提交
    • S
      Add a type object to Column constructor · 4bd5dffc
      Sean Griffin 提交于
      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`.
      4bd5dffc
  7. 16 5月, 2014 1 次提交
  8. 04 5月, 2014 3 次提交
  9. 01 5月, 2014 1 次提交
  10. 18 4月, 2014 1 次提交
  11. 10 4月, 2014 5 次提交
  12. 08 4月, 2014 1 次提交
  13. 31 3月, 2014 1 次提交
  14. 27 3月, 2014 4 次提交
  15. 26 3月, 2014 2 次提交
  16. 04 3月, 2014 1 次提交
  17. 13 2月, 2014 1 次提交
  18. 17 12月, 2013 1 次提交
  19. 14 12月, 2013 1 次提交
  20. 10 12月, 2013 1 次提交
  21. 29 11月, 2013 4 次提交
  22. 26 11月, 2013 1 次提交
  23. 11 11月, 2013 1 次提交
  24. 06 11月, 2013 1 次提交
    • D
      Don't swallow exceptions in transctional statements · 5d870c92
      Doug Barth 提交于
      The MySQL connection adapater swallows all StandardError exceptions,
      which includes Mysql::Error and Mysql2::Error. The comment in the
      exception clause claims errors thrown here indicate that transactions
      aren't supported by the server but that isn't necessarily true. It's
      possible the MySQL server has gone away and swallowing a failed commit
      may let the application return a successful response when the data has
      not been saved. Also, replication libraries like Galera require that the
      application handle exceptions thrown at BEGIN/COMMIT.
      
      I'm unable to determine what version of MySQL threw an exception for
      transactional statements. I tried as far back as 3.23.49 with InnoDB
      disabled but BEGIN & COMMIT statements do not throw an error. If there's
      a real case for this logic to continue, we could instead push this
      behavior into a configuration setting.
      
      The exception swallowing has been there since the beginning:
      db045dbb
      5d870c92
  25. 30 9月, 2013 2 次提交