1. 27 10月, 2012 1 次提交
  2. 26 10月, 2012 2 次提交
    • J
      remove unused config option · 6ac33f9e
      Jon Leighton 提交于
      6ac33f9e
    • J
      Remove ActiveRecord::Model · 9e4c41c9
      Jon Leighton 提交于
      In the end I think the pain of implementing this seamlessly was not
      worth the gain provided.
      
      The intention was that it would allow plain ruby objects that might not
      live in your main application to be subclassed and have persistence
      mixed in. But I've decided that the benefit of doing that is not worth
      the amount of complexity that the implementation introduced.
      9e4c41c9
  3. 24 10月, 2012 1 次提交
  4. 23 10月, 2012 2 次提交
  5. 21 10月, 2012 5 次提交
  6. 20 10月, 2012 5 次提交
  7. 19 10月, 2012 5 次提交
  8. 18 10月, 2012 4 次提交
  9. 17 10月, 2012 1 次提交
  10. 16 10月, 2012 6 次提交
  11. 15 10月, 2012 2 次提交
  12. 14 10月, 2012 4 次提交
    • A
      #7914 Remove code for unsupported postgreSQL version. · 8fb841bd
      Arturo Pie 提交于
      Remove parsing of character type default values for 8.1 formatting since
      Rails doesn't support postgreSQL 8.1 anymore.
      
      Remove misleading comment unrelated to code.
      8fb841bd
    • A
      #7914 Using a better way to get the defaults from db. · 40475cf3
      Arturo Pie 提交于
      According to postgreSQL documentation:
      (http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html)
      we should not be using 'adsrc' field because this field is unaware of
      outside changes that could affect the way that default values are
      represented. Thus, I changed the queries to use
      "pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.
      40475cf3
    • A
      #7914 Add change of previous commit to CHANGELOG.md · 54b3f417
      Arturo Pie 提交于
      54b3f417
    • A
      #7914 get default value when type uses schema name · 2da85edd
      Arturo Pie 提交于
      PostgreSQL adapter properly parses default values when using multiple
      schemas and domains.
      
      When using domains across schemas, PostgresSQL prefixes the type of the
      default value with the name of the schema where that type (or domain) is.
      
      For example, this query:
      ```
      SELECT a.attname, d.adsrc
      FROM pg_attribute a LEFT JOIN pg_attrdef d
      ON a.attrelid = d.adrelid AND a.attnum = d.adnum
      WHERE a.attrelid = "defaults"'::regclass
      AND a.attnum > 0 AND NOT a.attisdropped
      ORDER BY a.attnum;
      ```
      
      could return something like "'<default_value>'::pg_catalog.text" or
      "(''<default_value>'::pg_catalog.text)::text" for the text columns with
      defaults.
      
      I modified the regexp used to parse this value so that it ignores
      anything between ':: and \b(?:character varying|bpchar|text), and it
      allows to have optional parens like in the above second example.
      2da85edd
  13. 13 10月, 2012 2 次提交
    • A
      performance improvements to joins! · db8dbe76
      Aaron Patterson 提交于
      Before:
      
      Calculating -------------------------------------
                        ar        87 i/100ms
      -------------------------------------------------
                        ar      823.4 (±11.8%) i/s -       4089 in   5.070234s
      
      After:
      
      Calculating -------------------------------------
                        ar        88 i/100ms
      -------------------------------------------------
                        ar      894.1 (±3.9%) i/s -       4488 in   5.028161s
      
      Same test as 3a6dfca7
      db8dbe76
    • A
      Speed up relation merging by reducing calls to Array#- · 3a6dfca7
      Aaron Patterson 提交于
      before:
      
      Calculating -------------------------------------
                        ar        83 i/100ms
      -------------------------------------------------
                        ar      832.1 (±4.0%) i/s -       4233 in   5.096611s
      
      after:
      
      Calculating -------------------------------------
                        ar        87 i/100ms
      -------------------------------------------------
                        ar      839.0 (±9.3%) i/s -       4176 in   5.032782s
      
      Benchmark:
      
      require 'config/environment'
      require 'benchmark/ips'
      
      GC.disable
      
      unless User.find_by_login('tater')
        u = User.new
        u.login = 'tater'
        u.save!
      end
      
      def active_record
        user = User.find_by_login('tater')
        starred = user.starred_items.count
      end
      
      active_record
      
      Benchmark.ips do |x|
        x.report("ar") { active_record }
      end
      3a6dfca7