1. 23 3月, 2013 5 次提交
  2. 21 3月, 2013 1 次提交
  3. 15 3月, 2013 3 次提交
  4. 13 3月, 2013 1 次提交
  5. 09 3月, 2013 1 次提交
  6. 08 3月, 2013 1 次提交
  7. 01 3月, 2013 1 次提交
  8. 28 2月, 2013 1 次提交
  9. 25 2月, 2013 1 次提交
  10. 16 2月, 2013 2 次提交
  11. 14 2月, 2013 1 次提交
  12. 12 2月, 2013 1 次提交
  13. 07 2月, 2013 2 次提交
  14. 30 1月, 2013 2 次提交
  15. 29 1月, 2013 3 次提交
  16. 24 1月, 2013 1 次提交
  17. 23 1月, 2013 1 次提交
  18. 07 1月, 2013 2 次提交
  19. 06 1月, 2013 1 次提交
  20. 05 1月, 2013 1 次提交
  21. 16 12月, 2012 1 次提交
  22. 09 12月, 2012 1 次提交
    • A
      Session variables for mysql, mysql2, and postgresql adapters can be set · 97d06e8c
      Aaron Stone 提交于
      in the new 'variables:' hash in each database config section in database.yml.
      The key-value pairs of this hash will be sent in a 'SET key = value, ...'
      query on new database connections.
      
      The configure_connection methods from mysql and mysql2 into are
      consolidated into the abstract_mysql base class.
      97d06e8c
  23. 14 10月, 2012 3 次提交
    • 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 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
  24. 09 10月, 2012 1 次提交
  25. 21 9月, 2012 1 次提交
    • J
      Support for specifying transaction isolation level · 392eeecc
      Jon Leighton 提交于
      If your database supports setting the isolation level for a transaction,
      you can set it like so:
      
        Post.transaction(isolation: :serializable) do
          # ...
        end
      
      Valid isolation levels are:
      
      * `:read_uncommitted`
      * `:read_committed`
      * `:repeatable_read`
      * `:serializable`
      
      You should consult the documentation for your database to understand the
      semantics of these different levels:
      
      * http://www.postgresql.org/docs/9.1/static/transaction-iso.html
      * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html
      
      An `ActiveRecord::TransactionIsolationError` will be raised if:
      
      * The adapter does not support setting the isolation level
      * You are joining an existing open transaction
      * You are creating a nested (savepoint) transaction
      
      The mysql, mysql2 and postgresql adapters support setting the
      transaction isolation level. However, support is disabled for mysql
      versions below 5, because they are affected by a bug
      (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level
      gets persisted outside the transaction.
      392eeecc
  26. 15 9月, 2012 1 次提交