[postmodern-devel] doquery - iterating rows
Mark Slamin
mslamin at gmail.com
Wed Oct 1 00:27:48 UTC 2008
Sorry, more questions.
I'm trying to iterate down rows in the database.
Using doquery like this:
(defun iterate-rows ()
(doquery (query (:select 'name :from 'htable) :list)
(xname)
(print xname)))
I receive the following error:
The value of CL-POSTGRES::QUERY is ("(A B)"), which is not of type STRING.
[Condition of type SIMPLE-TYPE-ERROR]
I'm not sure what to do with that.
Also, on a broader scale, what I'm trying to do is iterate through the rows
of a large database and I don't want to load the entire results of the query
into memory. Ideally I just want to load one record with all its fields,
perform some operations on that data, write the record back if its been
updated, and then move to the next record.
Is doquery the best method for that? Or is there something else that would
work better?
Thank you,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20080930/e5392661/attachment.html>
More information about the postmodern-devel
mailing list