[Generate `select-using-objects' WHERE clauses with method clinton@unknownlamer.org**20110220105313 Ignore-this: 3343d5529c5b6e03128c06df8fcf01d0 * Splits things up a bit * No use in pretending this isn't just to hack % search onto this for maxclaims ] { hunk ./src/db-access-object-sql.lisp 233 +(defgeneric select-using-object-where-clause (search-value slotd column-name) + (:method (search-value slotd column-name) + `(:= ,column-name ,search-value))) hunk ./src/db-access-object-sql.lisp 237 +(defmethod select-using-object-where-clause ((search-value string) slotd column-name) + `(:ilike ,column-name ,(format nil "~A%" search-value))) + +;;; add generic (val) -> where-clause hunk ./src/db-access-object-sql.lisp 245 - (if (stringp val) - (push `(:ilike ,(slot-definition-column-name slotd) ,(format nil "~A%" val)) select-query) - (push `(:= ,(slot-definition-column-name slotd) ,val) select-query)))) + (push (select-using-object-where-clause + val slotd (slot-definition-column-name slotd)) + select-query))) }