Public Vars

Back

where (clj)

(source)

function

(where & exprs)
Accepts one or more SQL expressions (conditions) and combines them with AND (by default): (where [:= :status 0] [:<> :task "backup"]) or: (where :and [:= :status 0] [:<> :task "backup"]) Produces: WHERE (status = ?) AND (task <> ?) Parameters: 0 "backup" For a single expression, the brackets can be omitted: (where := :status 0) ; same as (where [:= :status 0]) With multiple expressions, the conjunction may be specified as a leading symbol: (where :or [:= :status 0] [:= :task "stop"]) Produces: WHERE (status = 0) OR (task = ?) Parameters: 0 "stop"

Examples