1. 05 10月, 2012 1 次提交
  2. 04 10月, 2012 1 次提交
    • F
      Count returns 0 without querying if parent is not saved · aa202adf
      Francesco Rodriguez 提交于
      Patches `CollectionAssociation#count` to return 0 without querying
      if the parent record is new. Consider the following code:
      
          class Account
            has_many :dossiers
          end
      
          class Dossier
            belongs_to :account
          end
      
          a = Account.new
          a.dossiers.build
      
          # before patch
          a.dossiers.count
          # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL
          # => 0
      
          # after
          a.dosiers.count # fires without sql query
          # => 0
      
      Fixes #1856.
      aa202adf
  3. 03 10月, 2012 1 次提交
  4. 02 10月, 2012 1 次提交
  5. 29 9月, 2012 3 次提交
    • Y
      Change query pattern case insensitive · 10f5f230
      Yasuo Honda 提交于
      because Oracle adapter uses upper case attribute/column name.
      10f5f230
    • J
      Add an explicit test for hot compatibility · d14da793
      Jon Leighton 提交于
      d14da793
    • J
      Support for partial inserts. · 144e8691
      Jon Leighton 提交于
      When inserting new records, only the fields which have been changed
      from the defaults will actually be included in the INSERT statement.
      The other fields will be populated by the database.
      
      This is more efficient, and also means that it will be safe to
      remove database columns without getting subsequent errors in running
      app processes (so long as the code in those processes doesn't
      contain any references to the removed column).
      144e8691
  6. 26 9月, 2012 2 次提交
  7. 25 9月, 2012 1 次提交
  8. 24 9月, 2012 1 次提交
  9. 22 9月, 2012 6 次提交
  10. 21 9月, 2012 3 次提交
  11. 19 9月, 2012 1 次提交
  12. 17 9月, 2012 8 次提交
  13. 16 9月, 2012 2 次提交
  14. 15 9月, 2012 7 次提交
  15. 14 9月, 2012 1 次提交
    • D
      Moves column dump specific code to a module included in AbstractAdapter · 4544d2bc
      Dan McClain 提交于
      Having column related schema dumper code in the AbstractAdapter. The
      code remains the same, but by placing it in the AbstractAdapter, we can
      then overwrite it with Adapter specific methods that will help with
      Adapter specific data types.
      
      The goal of moving this code here is to create a new migration key for
      PostgreSQL's array type. Since any datatype can be an array, the goal is
      to have ':array => true' as a migration option, turning the datatype
      into an array. I've implemented this in postgres_ext, the syntax is
      shown here: https://github.com/dockyard/postgres_ext#arrays
      
      Adds array migration support
      
      Adds array_test.rb outlining the test cases for array data type
      Adds pg_array_parser to Gemfile for testing
      Adds pg_array_parser to postgresql_adapter (unused in this commit)
      
      Adds schema dump support for arrays
      
      Adds postgres array type casting support
      
      Updates changelog, adds note for inet and cidr support, which I forgot to add before
      
      Removing debugger, Adds pg_array_parser to JRuby platform
      
      Removes pg_array_parser requirement, creates ArrayParser module used by
      PostgreSQLAdapter
      4544d2bc
  16. 13 9月, 2012 1 次提交