
29 Jul
2010
29 Jul
'10
10:04 a.m.
I have a data structure roughly like data Prices = Prices { today :: [Price], thisYear :: [Price] } Both today and thisYear are initially populated by database queries using HDBC. I then have functions which call today and possibly call thisYear. thisYear is not called often and the query to retrieve that data is very expensive. I thought I could use HDBC's laziness to postpone actually running the slow query until thisYear was required. Attempts with quickQuery suggest that the query is executed immediately and the only laziness is with fetching the results. Is it possible to make thisYear a lazy list which only executes the query if thisYear's values are required? Thank you. -- Michael
5409
Age (days ago)
5409
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Hendricks