1. 17 11月, 2014 1 次提交
  2. 14 11月, 2014 1 次提交
  3. 05 11月, 2014 1 次提交
  4. 02 11月, 2014 1 次提交
  5. 30 10月, 2014 2 次提交
  6. 21 10月, 2014 1 次提交
    • C
      Remove duplicate 'select' database statement · ec981aa1
      claudiob 提交于
      The `select` method has the same definition in almost all database
      adapters, so it can be moved from the database-specific adapters
      (PostgreSQl, MySQL, SQLite) to the abstract `database_statement`:
      
      ```ruby
      def select(sql, name = nil, binds = [])
        exec_query(sql, name, binds)
      end
      ```
      
      ---
      
      More details about this commit: the only two DB-specific adapters
      that have a different definition of `select` are MySQLAdapter and
      MySQL2Adapter.
      
      In MySQLAdapter, `select` invokes `exec_query(sql, name, binds)`, so
      calling `super` achieves the same goal with less repetition.
      
      In MySQL2Adapter, `select` invokes `exec_query(sql, name)`, that is,
      it does not pass the `binds` parameter like other methods do. However,
      [MySQL2Adapter's `exec_query`](https://github.com/rails/rails/blob/74a527cc63ef56f3d0a42cf638299958dc7cb08c/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L228L231)
      works exactly the same whether this parameters is passed or not, so the output
      does not change:
      
      ```ruby
      def exec_query(sql, name = 'SQL', binds = [])
        result = execute(sql, name)
        ActiveRecord::Result.new(result.fields, result.to_a)
      end
      ```
      ec981aa1
  7. 16 10月, 2014 1 次提交
  8. 23 9月, 2014 1 次提交
    • A
      add a truncate method to the connection · 9a4e183f
      Aaron Patterson 提交于
      it doesn't work on SQLite3 since it doesn't support truncate, but that's
      OK.  If you call truncate on the connection, you're now bound to that
      database (same as if you use hstore or any other db specific feature).
      9a4e183f
  9. 09 9月, 2014 1 次提交
  10. 05 9月, 2014 1 次提交
  11. 25 7月, 2014 1 次提交
  12. 07 7月, 2014 1 次提交
  13. 03 7月, 2014 1 次提交
  14. 29 6月, 2014 1 次提交
    • S
      Always pass a column with a type object to quote · b404613c
      Sean Griffin 提交于
      The only case where we got a column that was not `nil`, but did not
      respond to `cast_type` was when type casting the default value during
      schema creation. We can look up the cast type, and add that object to
      the column definition. Will allow us to consistently rely on the type
      objects for type casting in all directions.
      b404613c
  15. 27 6月, 2014 1 次提交
  16. 22 6月, 2014 1 次提交
  17. 19 6月, 2014 1 次提交
  18. 10 6月, 2014 1 次提交
    • S
      Rename `type_cast` to `type_cast_from_database` · d24e6407
      Sean Griffin 提交于
      In some cases there is a difference between the two, we should always
      be doing one or the other. For convenience, `type_cast` is still a
      private method on type, so new types that do not need different behavior
      don't need to implement two methods, but it has been moved to private so
      it cannot be used accidentally.
      d24e6407
  19. 06 6月, 2014 1 次提交
  20. 04 6月, 2014 1 次提交
    • S
      Collapse PG default extractoin of most types to single regex · 405fd22e
      Sean Griffin 提交于
      For any type that is represented as a string and then type cast, we do
      not need separate regular expressions for the various types. No function
      will match this regex. User defined types *should* match this, so that
      the type object can decide what to do with the value.
      405fd22e
  21. 03 6月, 2014 4 次提交
  22. 30 5月, 2014 1 次提交
  23. 27 5月, 2014 1 次提交
  24. 26 5月, 2014 2 次提交
  25. 24 5月, 2014 3 次提交
  26. 23 5月, 2014 6 次提交
  27. 21 5月, 2014 1 次提交
  28. 20 5月, 2014 1 次提交