-
-
Notifications
You must be signed in to change notification settings - Fork 339
Labels
Description
Hi, thank for your work on this!
I wonder if I can assoicated an object by an id to another corresponding object during iteration.
i.e. Getting the object A, B during the iteration by inner join.
// SELECT A.*, B.*
// FROM A
// INNER JOIN B
// ON A.b_uid = B.uid
for (auto& [a, b] : storage.iterate<A, B>(inner_join<B>(on(c(&A::b_uid) == &B::uid)))) {
// do something to a, b
...
}
According to the inner join example, now I can only use select
with a batch size to avoid memory issue when the tables are too large to be loaded once.
get_all
return objects but only for the left one. i.e. get_all<A>(statement)
, so if there is a usage like get_all<A, B>(statement)
, it'll also solve the problem by setting a reading batch size
Is there any hidden method I ignored to do that?