1. 21 12月, 2015 1 次提交
  2. 18 12月, 2015 4 次提交
  3. 17 12月, 2015 5 次提交
    • A
      Remove legacy mysql adapter · fb24d0ed
      Abdelkader Boudih 提交于
      fb24d0ed
    • G
      Support passing the schema name prefix to `conenction.indexes` · d927f35b
      Grey Baker 提交于
      Support passing the schema name as a prefix to table name in
      `ConnectionAdapters::SchemaStatements#indexes`. Previously the prefix would
      be considered a full part of the index name, and only the schema in the
      current search path would be considered.
      d927f35b
    • S
      Don't over-specify types in our tests · 7fb47a85
      Sean Griffin 提交于
      This test was failing when run on Windows using PostgreSQL. Depending on
      the OS (and 32 vs 64 bit), this type could be a `BigNum`. We could loosen
      the assertion to `Numeric`, but if the value is equal to the expected, and
      responds to `bitlength` properly, who cares?
      7fb47a85
    • S
      Fix test failures on Windows · bc39fa07
      Sean Griffin 提交于
      Unlike unix, the TZ variable on Windows does not look at a database. It is
      always expected to be in the form {Standard Time
      Abbreviation}{UTC-Offset}{Daylight Time Abbriviation}. This changes the
      relevant tests to use the Windows form when run from Windows.
      bc39fa07
    • S
      Fix test failure on Windows · f0f4f543
      Sean Griffin 提交于
      When this test was run on Windows, the database file would still be in
      use, and `File.unlink` would fail. This would cause the temp directory to
      be unable to be removed, and error out. By disconnecting the connection
      when finished, we can avoid this error.
      f0f4f543
  4. 16 12月, 2015 4 次提交
  5. 15 12月, 2015 8 次提交
  6. 14 12月, 2015 2 次提交
    • S
      Use a bind param for `LIMIT` and `OFFSET` · 574f2556
      Sean Griffin 提交于
      We currently generate an unbounded number of prepared statements when
      `limit` or `offset` are called with a dynamic argument. This changes
      `LIMIT` and `OFFSET` to use bind params, eliminating the problem.
      
      `Type::Value#hash` needed to be implemented, as it turns out we busted
      the query cache if the type object used wasn't exactly the same object.
      
      This drops support for passing an `Arel::Nodes::SqlLiteral` to `limit`.
      Doing this relied on AR internals, and was never officially supported
      usage.
      
      Fixes #22250.
      574f2556
    • S
      Deprecate limit strings with commas · 4358b0d1
      Sean Griffin 提交于
      Some backends allow `LIMIT 1,2` as a shorthand for `LIMIT 1 OFFSET 2`.
      Supporting this in Active Record massively complicates using bind
      parameters for limit and offset, and it's trivially easy to build an
      invalid SQL query by also calling `offset` on the same `Relation`.
      
      This is a niche syntax that is only supported by a few adapters, and can
      be trivially worked around by calling offset explicitly.
      4358b0d1
  7. 13 12月, 2015 1 次提交
  8. 07 12月, 2015 2 次提交
    • A
      Make sure we touch all the parents when touch_later. · e7c48db5
      Arthur Neves 提交于
      The problem was that when saving an object, we would
      call touch_later on the parent which wont be saved immediteally, and
      it wont call any callbacks. That was working one level up because
      we were calling touch, during the touch_later commit phase. However that still
      didnt solve the problem when you have a 3+ levels of parents to be touched,
      as calling touch would affect the parent, but it would be too late to run callbacks
      on its grand-parent.
      
      The solution for this, is instead, call touch_later upwards when the first
      touch_later is called. So we make sure all the timestamps are updated without relying
      on callbacks.
      
      This also removed the hard dependency BelongsTo builder had with the TouchLater module.
      So we can still have the old behaviour if TouchLater module is not included.
      
      [fixes 5f5e6d92]
      [related #19324]
      e7c48db5
    • G
      Introduce after_{create,update,delete}_commit callbacks · 5a300b2e
      Genadi Samokovarov 提交于
      Those are actually shortcuts for `after_commit`.
      
      Before:
      
          after_commit :add_to_index_later, on: :create
          after_commit :update_in_index_later, on: :update
          after_commit :remove_from_index_later, on: :destroy
      
      After:
      
          after_create_commit  :add_to_index_later
          after_update_commit  :update_in_index_later
          after_destroy_commit :remove_from_index_later
      5a300b2e
  9. 05 12月, 2015 1 次提交
    • Y
      remove warning from postgresql geometric test · 4ab20ed5
      yuuji.yaginuma 提交于
      This removes the following warning which has been out in the case of a PostgreSQL 9.3 below.
      
      ```
      activerecord/test/cases/adapters/postgresql/geometric_test.rb:265: warning: instance variable @connection not initialized
      ```
      4ab20ed5
  10. 03 12月, 2015 1 次提交
  11. 02 12月, 2015 3 次提交
  12. 01 12月, 2015 2 次提交
  13. 24 11月, 2015 4 次提交
  14. 23 11月, 2015 1 次提交
  15. 21 11月, 2015 1 次提交