Closed jordan-bonecutter closed 2 months ago
Thanks for your contribution @jordan-bonecutter! Unfortunately, for backward compatibility reasons, the Neo4j Go driver only bumps the Go version (currently 1.18) during a major release. Implementing this change now would break backward compatibility, so we would need to hold off until version 6 of the drivers (we're currently on version 5.24.0).
Please feel free to keep an eye on our progress towards version 6, I've carded this up to revisit at that time.
Thanks for your contribution @jordan-bonecutter! Unfortunately, for backward compatibility reasons, the Neo4j Go driver only bumps the Go version (currently 1.18) during a major release. Implementing this change now would break backward compatibility, so we would need to hold off until version 6 of the drivers (we're currently on version 5.24.0).
Please feel free to keep an eye on our progress towards version 6, I've carded this up to revisit at that time.
Makes sense.
What if instead of returning iter.Seq2[*db.Record, error]
it returned a func(yield func(*db.Record, error) bool)
which could be inferred to be an iter.Seq2
by newer versions of go without requiring the 1.23
bump? I can prototype this but it should work.
@StephenCathcart I pushed a new commit which doesn't require go 1.23
in the go.mod
file but works as an iter.Seq2
. Let me know if you're ok with opening another PR
With the introduction of go 1.23 it would be useful to add support for an
iter.Seq
from theResultWithContext
type to avoid allocating memory on the order of the size of the results. This PR adds aRecords
method returning aniter.Seq2[*Record, error]
which allows the user to for loop over the records in aResultWithContext
.