[web-devel] Sql join feature in persistent

Michael Snoyman michael at snoyman.com
Tue Feb 22 10:37:55 CET 2011

Hi James,

It's funny you mention this now. I recently got an email from Антон
Чешков about this very topic. Hopefully he can share the code he sent
me with the list. The one improvement that we're planning on making is
to write it using enumerators instead of lists so that the memory
requirements are lower.

For now, however, you might have noticed that the Haskellers code does
a number of "pseudo-joins" all over the place, which currently works
well enough. Антон's suggested code basically automates a lot of this


On Tue, Feb 22, 2011 at 11:25 AM, James <cnjamesdeng at gmail.com> wrote:
> Hi all,
> I'm new to this mailing list. I did web development in python with
> Django framework before. But I really like the haskell language, so
> considering building my next site (a LBS-SN like service) in haskell. I
> learn snap for a while and think it's not so mature and powerful. After
> I learned the yesod docs in one day and read some yesod and
> haskellers.com codes in the following few days, I appreciate it and try
> to use it seriously.
> Now I need a database query across two table, so as to sql join feature.
> Currently, persistent doesn't provide this functionality. I think maybe
> adding a function to PersistBackend class, and implementing it in
> PersistBackend (SqlPersist m) may solve the problem. However, I am not
> sured. Will it be difficult and consistent to implement this feature?
> Thanks for any help.
> Sincerely,
> --
> James Deng
> department of computer science,
> school of information science & technology,
> Sun-yat-sen University, Guangzhou, China
> mailTo: cnJamesDeng at gmail.com
> homepage: http://cnjdeng.appspot.com
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

More information about the web-devel mailing list