[odb-users] How to transfer query results between methods.

Boris Kolpackov boris at codesynthesis.com
Wed Dec 31 12:42:29 EST 2014


Hi Harrie,

Harrie9 <harriev9 at gmail.com> writes:

> I expect the information is lost due to destruction of the r object.

No, the problem is not the destruction of the result object but the
end of the transaction. You cannot iterate over the query result
outside of a transaction. So you will either need to factor out
the transaction begin/commit calls to the caller or you will have
to iterate in the function and make some kind of a copy of the
result sequence.

Boris
 



More information about the odb-users mailing list