1. 20 1月, 2015 5 次提交
    • Y
      Merge pull request #18597 from kamipo/add-if-exists-to-drop-table · 6b2be718
      Yves Senn 提交于
      Add an `:if_exists` option to `drop_table`
      6b2be718
    • S
      Fix bind value copying from subqueried relations · 04d1c371
      Sean Griffin 提交于
      With the old implementation, the bind values were created, and then we
      search the attributes for `Relation` objects, and merge them. This
      completely ignores the order that the actual `where` clause will use. If
      all non-relation where parameters are before the relations, it will
      work. However, if we query on both a relation and a value, with the
      value coming second, it breaks. The order of the hash should not affect
      the final query (especially since hashes being ordered is an
      implementation detail)
      04d1c371
    • S
      Move `create_binds` over to the `PredicateBuilder` · 50a8cdf0
      Sean Griffin 提交于
      I'm looking to introduce a `WhereClause` class to handle most of this
      logic, and this method will eventually move over to there. However, this
      intermediate refactoring should make that easier to do.
      50a8cdf0
    • S
      Whether a column exists or not doesn't affect whether we can use binds · 40887135
      Sean Griffin 提交于
      Looking through the blame, this logic used to be when we actually
      created the bind tuple. My guess is that `nil` couldn't be handled there
      at that time. It can, now.
      40887135
    • S
      Don't mutate bind values in `Relation` · 76d7d957
      Sean Griffin 提交于
      In order to better facilitate refactoring, most places that mutated
      `bind_values` have already been removed. One last spot snuck through.
      Since we're no longer mutating the array, it also does not need to be
      duped in `initialize_copy`.
      76d7d957
  2. 19 1月, 2015 19 次提交
  3. 18 1月, 2015 16 次提交