1. 11 7月, 2014 1 次提交
  2. 07 7月, 2014 1 次提交
  3. 06 7月, 2014 1 次提交
  4. 05 7月, 2014 1 次提交
  5. 01 7月, 2014 1 次提交
  6. 03 6月, 2014 1 次提交
  7. 29 5月, 2014 1 次提交
  8. 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
  9. 20 5月, 2014 2 次提交
    • S
      36fde2b7
    • 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
  10. 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
  11. 04 5月, 2014 1 次提交
  12. 18 4月, 2014 1 次提交
  13. 10 4月, 2014 3 次提交
  14. 04 4月, 2014 1 次提交
    • Y
      PostgreSQL and SQLite, remove varchar limit. [Vladimir Sazhin & Toms Mikoss & Yves Senn] · f4226c3a
      Yves Senn 提交于
      There is no reason for the PG adapter to have a default limit of 255 on :string
      columns. See this snippet from the PG docs:
      
          Tip: There is no performance difference among these three types, apart
          from increased storage space when using the blank-padded type, and a
          few extra CPU cycles to check the length when storing into a
          length-constrained column. While character(n) has performance
          advantages in some other database systems, there is no such advantage
          in PostgreSQL; in fact character(n) is usually the slowest of the
          three because of its additional storage costs. In most situations text
          or character varying should be used instead.
      f4226c3a
  15. 02 4月, 2014 1 次提交
    • J
      Clarify 'database does not exist' message and implementation. · 9aa7c25c
      Jeremy Kemper 提交于
      * Clarify what the situation is and what to do.
      * Advise loading schema using `rake db:setup` instead of migrating.
      * Use a rescue in the initializer rather than extending the error
        message in-place.
      * Preserve the original backtrace of other errors by using `raise`
        rather than raising again with `raise error`.
      
      References 0ec45cd1
      9aa7c25c
  16. 31 1月, 2014 1 次提交
    • A
      Fix regression on `.select_*` methods. · b7fcad8f
      Arthur Neves 提交于
      This was a common pattern:
      ```
      query = author.posts.select(:title)
      connection.select_one(query)
      ```
      
      However `.select` returns a ActiveRecord::AssociationRelation, which has
      the bind information, so we can use that to get the right sql query.
      
      Also fix select_rows on postgress and sqlite3 that were not using the binds
      
      [fixes #7538]
      [fixes #12017]
      [related #13731]
      [related #12056]
      b7fcad8f
  17. 18 1月, 2014 1 次提交
  18. 16 1月, 2014 1 次提交
  19. 15 1月, 2014 1 次提交
  20. 14 1月, 2014 2 次提交
  21. 24 12月, 2013 1 次提交
  22. 12 12月, 2013 1 次提交
  23. 12 11月, 2013 2 次提交
  24. 10 11月, 2013 1 次提交
  25. 09 11月, 2013 1 次提交
    • Y
      log bind variables after they were type casted. · 97f0d9a0
      Yves Senn 提交于
      The log output used to be confusing in situation where type casting has
      "unexpected" effects. For example when finding records with a `String`.
      
      BEFORE:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", "im-no-integer"]]
      
      AFTER:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", 0]]
      97f0d9a0
  26. 14 10月, 2013 1 次提交
  27. 30 9月, 2013 2 次提交
  28. 12 9月, 2013 1 次提交
    • R
      Check if the SQL is not a prepared statement · f13b2785
      Rafael Mendonça França 提交于
      When the adapter is with prepared statement disabled and the binds array
      is not empty the connection adapter will try to set the binds values and
      will fail. Now we are checking if the adapter has the prepared statement
      disabled.
      
      Fixes #12023
      f13b2785
  29. 11 8月, 2013 1 次提交
  30. 09 8月, 2013 1 次提交
  31. 06 8月, 2013 2 次提交
  32. 29 3月, 2013 1 次提交
  33. 26 3月, 2013 1 次提交