should be equivalent (in result, don't have to create an actual named query) to running a named query:
(defentity user
(fields
[firstname :varchar])
(queries
:list-queries "SELECT * FROM user WHERE firstname IN (:names)"))
(list-user-query :list-queries {:names ["John" "Mary"]})
should run the query "SELECT * FROM user WHERE firstname in (?,?) AND group-id IN (?,?,?,?) AND member=?"
Notice the handling of collections - passing a collection should make it an 'in', but passing a single value should make it an =.
This will lead to the creation of more specific named queries, such as reports and joins instead of a lot of utility listing queries, at the tradeoff of not having visibility on all the queries used in the system in one place.
should be equivalent (in result, don't have to create an actual named query) to running a named query:
It should support multiple columns:
should run the query "SELECT * FROM user WHERE firstname in (?,?) AND group-id IN (?,?,?,?) AND member=?"
Notice the handling of collections - passing a collection should make it an 'in', but passing a single value should make it an =.
This will lead to the creation of more specific named queries, such as reports and joins instead of a lot of utility listing queries, at the tradeoff of not having visibility on all the queries used in the system in one place.