An alternative to laziness would be selecting a subset of fields. There is no support for this directly in persistent, but it might be possible to add it and the future and have the value of an unselected field be something like undefined.
On Thu, May 5, 2011 at 1:28 PM, Felipe Almeida LessaThat's correct. In fact, Persistent avoids any form of lazy I/O to
<felipe.lessa@gmail.com> wrote:
> On Thu, May 5, 2011 at 2:20 AM, Jeremy Hughes <jedahu@gmail.com> wrote:
>> Is Database.Persistent lazy wrt reading fields? I need to iterate over
>> entities containing both small and large fields. I do not need to use
>> the large fields in this instance, and so would rather they were not
>> read from the database.
>
> IIRC, they are read strictly. I guess you should put them on a
> different entity.
ensure that database connections are returned to the pool as soon as
possible (amongst other reasons).
Michael
_______________________________________________
web-devel mailing list
web-devel@haskell.org
http://www.haskell.org/mailman/listinfo/web-devel