[postmodern-devel] Retrieving completely populated DAOs based on SQL string query
Marijn Haverbeke
marijnh at gmail.com
Tue Oct 5 09:02:55 UTC 2010
Hi Mitch,
> (select-dao 'foo-db-name (:in 'foo.id (:set (flatten (query "SELECT
> DISTINCT foo.id FROM foo, etc.")))))
I'm not quite sure what you are trying to achieve. Unless the 'etc'
was relevant, you seem to be selecting all ids from your foo table,
and then select only those rows in the foo table that have an id that
exists in the foo table -- i.e., every single row. Why? If your 'etc'
is a WHERE clause, you should be able to directly pass it as the test
argument to select-dao.
Best,
Marijn
More information about the postmodern-devel
mailing list