1. 04 4月, 2014 1 次提交
  2. 03 4月, 2014 5 次提交
  3. 02 4月, 2014 10 次提交
  4. 01 4月, 2014 5 次提交
    • Y
      PostgreSQL determine `Column#type` through corresponding OID. #7814 · 4d344bb4
      Yves Senn 提交于
      I ran the whole test suite and compared the old to the new types.
      Following is the list of types that did change with this patch:
      
      ```
      DIFFERENT TYPE FOR mood: NEW: enum, BEFORE:
      DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float
      ```
      
      The `floatrange` is a custom type. The old type `float` was simply a coincidence
      form the name `floatrange` and our type-guessing.
      4d344bb4
    • E
      refactor assert_sql query to reuse capture_sql · 49e17431
      eileencodes 提交于
      set assert_sql to reuse the capture_sql method from above
      instead of repeating the code
      
      in response to comments on issue #14546
      49e17431
    • E
      fix delete_all to remove records directly · e247f325
      eileencodes 提交于
      When delete_all is run on a CollectionProxy and has a
      dependency of delete_all the SQL that is produced has an IN
      statement. (DELETE FROM `associated_model` where `associated_model`
      .`parent_id` = 1 AND `associated_model`.`id` IN (1, 2, 3...)).
      This only happens if the association is not loaded (both loaded
      and non-loaded delete_all should behave the same. This is a huge
      problem when it comes to deleting many records because the query
      becomes very slow. Instead the SQL produced should be (DELETE FROM
      `assoicated_model` where `associated_model`.`parent_model_id`=1).
      
      I fixed this by making sure the check for loaded and destroy also
      makes sure that the dependent is not delete_all, so the conditional
      goes to the else and deletes the records directly without the IN
      statement.
      e247f325
    • E
      add test to compare sql statements in delete_all query · a116afe5
      eileencodes 提交于
      delete_all sql if an association is not loaded should behave
      the same as if the association is loaded. This test ensures
      the SQL statements are exactly the same.
      a116afe5
    • E
      add capture_sql method to compare sql statements and compare · a6729363
      eileencodes 提交于
      Other methods compare specific patterns, this method outputs
      the actual sql query that is generated.
      a6729363
  5. 31 3月, 2014 6 次提交
  6. 30 3月, 2014 1 次提交
  7. 29 3月, 2014 3 次提交
  8. 28 3月, 2014 6 次提交
  9. 27 3月, 2014 3 次提交
    • Y
      require dependency to execute a single test from xml_serialization_test · 5bf38ffc
      Yves Senn 提交于
      When the tests are executed in order, the dependency is loaded at the right time.
      However this makes it impossible to execute a single test later down the line.
      Let's require the dependecy at the beginning to get them working independent of the order.
      
      This resolves the following error:
      
      ```
      $ ARCONN=postgresql ruby -Itest /Users/senny/Projects/rails/activerecord/test/cases/xml_serialization_test.rb -n test_to_xml
      Using postgresql
      Run options: -n test_to_xml --seed 51819
      
      E
      
      Finished in 0.081320s, 12.2971 runs/s, 0.0000 assertions/s.
      
        1) Error:
      DatabaseConnectedXmlSerializationTest#test_to_xml:
      NameError: uninitialized constant DatabaseConnectedXmlSerializationTest::REXML
          /Users/senny/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:226:in `test_to_xml'
      ```
      
      /cc @tgxworld fyi
      5bf38ffc
    • Y
      only run citext_test if the connection supports_extensions?. · 70a41446
      Yves Senn 提交于
      This will keep the test suite passing with older PG installations.
      70a41446
    • L
      Add a test case for save(validate:false) with invalid foreign key. · ff8f9f09
      Lauro Caetano 提交于
      It is supposed to raise ActiveRecord::InvalidForeignKey when the
      database has a fk constraint.
      ff8f9f09