mysql2
mysql2 copied to clipboard
How to interrupt a streamed query?
I want to process a huge result set until certain condition is reached. However
result = conn.query("...", stream: true, cache_rows: false)
result.each do |row|
break
end
does not interrupt the iterator. Not even exit
exists the interpreter.
What is the correct way to do that?