我有以下代码:
sql = "select Board_Name AS 'Board Name', COUNT(Board_Name) AS 'Count' from dbo.TABLE GROUP BY Board_Name"
result = client.execute(sql)
result.each do |row|
binfo = [ label: row['Board Name'], value: row['Count'] ]
send_event('ticketsbyboard', { items: binfo })
end
我试图将所有传递给 send_event 的行作为一个数组,而不是一次只有一行。