[plt-scheme] Working with database using scheme language

From: Thomas Chust (chust at web.de)
Date: Mon Nov 24 17:31:26 EST 2008

Rohan Golwala schrieb:
> [...]
> I have set up a connection to the database using postgreSQL but I have a
> few questions while running the following queries:
> [...]


maybe it will help you to read the documentation of the map, for-each
and filter procedures in the PLT's core scheme, since the methods in
spgsql are modelled after those primitives.

map and for-each simply apply the given procedure to all the values from
each database row and either collect the results in a list or discard
them. mapfilter checks whether the filter procedure applied to the row
returns a true result before it applies the other procedure.

If you simply want to see the data returned by a query, the most obvious
first choice is to pass list as the procedure argument to the map method.


Posted on the users mailing list.