Re: [Haskell-cafe] Re: functional database queries

2007-02-22 Thread Henning Thielemann
On Wed, 21 Feb 2007 [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: If and only if the database is a purely functional immutable data structure, this can be done. [...] Many interesting databases are not purely functional immutable;

[Haskell-cafe] Re: functional database queries

2007-02-22 Thread apfelmus
Henning Thielemann wrote: In other words, 'Query a' just assembles a valid SQL-string, it does not query or execute anything. Of course, instead of the DSEL approach don't execute anything, only construct a program in a foreign language which does that it would be nice to have a database

Re: [Haskell-cafe] Re: functional database queries

2007-02-22 Thread Bjorn Bringert
On Feb 22, 2007, at 14:56 , Henning Thielemann wrote: On Wed, 21 Feb 2007 [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: If and only if the database is a purely functional immutable data structure, this can be done. [...] Many

[Haskell-cafe] Re: functional database queries

2007-02-21 Thread apfelmus
Henning Thielemann wrote: At http://www.haskell.org/hawiki/HaskellDbTutorial it is described, how database queries can be modelled with a monad. However, I wonder if this is also possible without monads. Say, writing DB.map col1 $ DB.filter (\row - col2 row == 10+2) myTable for SELECT

Re: [Haskell-cafe] Re: functional database queries

2007-02-21 Thread Albert Y. C. Lai
[EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: If and only if the database is a purely functional immutable data structure, this can be done. [...] Many interesting databases are not purely functional immutable; most reside in the external world and can spontaneously change behind your

[Haskell-cafe] Re: functional database queries

2007-02-21 Thread apfelmus
Albert Y. C. Lai wrote: [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: If and only if the database is a purely functional immutable data structure, this can be done. [...] Many interesting databases are not purely functional immutable; most reside in the external world and can

Re: [Haskell-cafe] Re: functional database queries

2007-02-21 Thread Bjorn Bringert
On Feb 21, 2007, at 20:47 , [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: [EMAIL PROTECTED] wrote: Albert Y. C. Lai wrote: If and only if the database is a purely functional immutable data structure, this can be done. [...] Many interesting databases are not purely functional immutable;