active?()
public
CONNECTION MANAGEMENT ====================================
Show source
def active?
if @connection.respond_to?(:stat)
@connection.stat
else
@connection.query 'select 1'
end
if @connection.respond_to?(:errno)
@connection.errno.zero?
else
true
end
rescue Mysql::Error
false
end