[odb-users] best practice to access query result across transaction

Boris Kolpackov boris at codesynthesis.com
Tue Mar 28 10:12:29 EDT 2017


Hi Fan,

Fan Zhang <fanz at linux.com> writes:

> [...] that the query result can not be accessed after the transaction
> is ended. I’m therefore copying stuff to a vector, which can be expensive.
> I guess odb must have some built-in support for this.

The reason you cannot access the query result after the transaction is
because most databases stream the data as you iterate over it. Given
this understanding, I wonder what kind of "magic" you expect ODB to
provide here?

Boris



More information about the odb-users mailing list