I was looking at a crash that happens when statement.next() is called. I have not gotten to the bottom of it, but I came across this code that doesn't seem to do what it intends. Indeed it seems that calling the iterator several time will not do the same thing:
let result = self.db.prepare(query)
result.forEach { ... }
// The second call will loop over the rows from a different element?
result.forEach { ... }
I was looking at a crash that happens when
statement.next()
is called. I have not gotten to the bottom of it, but I came across this code that doesn't seem to do what it intends. Indeed it seems that calling the iterator several time will not do the same thing: