Here's one way I found to do this: (select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT DISTINCT foo.id FROM foo, etc.")))))
On 10/4/2010 11:39 AM, Mitch Berkson wrote:
I'd like to retrieve fully populated DAOs based on a SQL string query - preferably without naming all the columns.
Using query-dao, I can get DAOs which have the columns I enumerate populated. For example, the following will retrieve DAOs with just the id slot populated.
(query-dao 'foo-db-name "SELECT DISTINCT foo.id FROM foo, etc.")
Alternatively, I can use select-dao to return complete DAOs, but I don't know how to write the test in the form of a SQL string to limit the DAOs that will be returned.
So it would help me to know how to write a SQL string which can be used as a test for select-dao. Or a way to have query-dao retrieve fully populated DAOs. Thanks for any help.
Mitch
postmodern-devel mailing list postmodern-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel