提交 3efad391 编写于 作者: A Andrew White

Whitelist adapters that support aliases in `HAVING` clause

Support for using `SELECT` column or expression aliases in the `HAVING`
clause isn't part of the SQL standard so it's better to whitelist the
test for adapters where we know it works and skip it on others.
上级 89d5d975
......@@ -249,7 +249,7 @@ def test_should_group_by_summed_field_having_condition
end
def test_should_group_by_summed_field_having_condition_from_select
skip if current_adapter?(:PostgreSQLAdapter, :OracleAdapter)
skip unless current_adapter?(:Mysql2Adapter, :SQLite3Adapter)
c = Account.select("MIN(credit_limit) AS min_credit_limit").group(:firm_id).having("min_credit_limit > 50").sum(:credit_limit)
assert_nil c[1]
assert_equal 60, c[2]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册