提交 831a277d 编写于 作者: S Sean Griffin

Merge pull request #24731 from vipulnsward/database-type

Change valid_type? from abstract adapter
......@@ -154,7 +154,7 @@ def arel_visitor # :nodoc:
end
def valid_type?(type)
true
false
end
def schema_creation
......
......@@ -154,6 +154,10 @@ def supports_index_sort_order?
true
end
def valid_type?(type)
true
end
# Returns 62. SQLite supports index names up to 64
# characters. The rest is used by rails internally to perform
# temporary rename operations
......
......@@ -17,6 +17,17 @@ def test_exec_query_nothing_raises_with_no_result_queries
end
end
def test_valid_column
with_example_table do
column = @conn.columns('ex').find { |col| col.name == 'id' }
assert @conn.valid_type?(column.type)
end
end
def test_invalid_column
assert_not @conn.valid_type?(:foobar)
end
def test_columns_for_distinct_zero_orders
assert_equal "posts.id",
@conn.columns_for_distinct("posts.id", [])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册