[storm] Lazy value loading

Adrian Adamiak adamiak at gmail.com
Fri Oct 24 14:04:44 BST 2008


Thank you all for your answers!
Adrian

On Fri, Oct 24, 2008 at 2:42 PM, Gustavo Niemeyer <gustavo at niemeyer.net> wrote:
> Hey Adrian,
>
>> Unfortunately this produces query which loads all fields, including
>> 'contents', which is unnecessary and takes a lot of time. I'd like to
>> make the 'contents' field lazy, i.e.
>>
>>  contents = Unicode(lazy=True)    # (in Book class definition)
>>
>> so that it would load only after I access this field (i.e.
>> books[0].contents). Is it possible?
>
> Unfortunately that feature isn't available out of the box yet, but
> it's in our TODO list, and will get done at some point.  Meanwhile,
> you cant try the way Thomas suggested.
>
> --
> Gustavo Niemeyer
> http://niemeyer.net
>



More information about the storm mailing list