JCRM <<pike[at]quick-hacks.co.uk>> wrote:
> I agree with you, that would be the obvious place to put it, but in
> order to do so the result would have to contain the connection.
Yes, but that's not a problem since it has a pointer to the connection
object.
> It would potentially lead to problems in usage too, as it would
> dissociate the database connection from the results, leading people
> to attempting to reuse it before they had properly consumed all the
> results from the connection.
That's essentially the difference between a big_query and a
streaming_query - in the latter case you know that's precisely what
you cannot do. It'd be prudent to make a runtime check for it as well,
so that an error is thrown if someone makes another query call while
having an outstanding streaming result object.
> Which is not in Pike 7.6 - but I assume the problems I've outlined
> above have been addressed for this, so it would be a way forward.
Well, streaming_query is in 7.8, at least. Perhaps you could consider
an upgrade? ;)
|