Closed wilsonjord closed 5 years ago
I could extract CacheRow and put it at module scope, but you could also just do:
import d2sqlite3.results : CachedResults;
alias CachedRow = CachedResults.CachedRow;
struct Foo {
CachedRow row;
}
or am I missing the point?
No, it is me that is missing the point. I never would have thought of something like that, I should have gone to the forums first. Thanks for your help.
No worries.
Currently, CachedResults is how to persist all the rows of a query in memory.
I'd like to use CachedRow in a different data structure, but it's currently defined as a nested struct within CachedResults.
Is there a way to move CachedRow outside of CachedResults, so it can be imported?
Note: CachedRow doesn't appear to use anything in it's outter (CachedResults) scope.
My current workout is have a direct copy/paste of the CachedRow struct into my own module, and then casting the result.
Thanks,
Jordan