(defmacro def-return-where (column &optional (table :sql-users)) "Generates a defun whose name is 'return-where-=', this generated function searches the table for entries where ' = column=. e.g '(def-return-where id) '(DEFUN RETURN-WHERE-ID= (ID) '(QUERY (:SELECT :* :FROM :SQL-USERS :WHERE (:= 'ID ID))))" `(defun ,(intern (concatenate 'string (symbol-name 'return-where-) (symbol-name column) "=")) (,column) (query (:select :* :from ,table :where (:= ',column ,column)))))