提交 007965a6 编写于 作者: A Aaron Patterson

don't need a begin / end.

上级 a29d1dbd
......@@ -23,12 +23,10 @@ def table_alias_for(table_name)
# === Example
# table_exists?(:developers)
def table_exists?(table_name)
begin
select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0", 'SCHEMA')
true
rescue
false
end
select_value("SELECT 1 FROM #{quote_table_name(table_name)} where 1=0", 'SCHEMA')
true
rescue
false
end
# Returns an array of indexes for the given table.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册