sqlgen.lisp 325 B

123456789101112
  1. (defun select (tables fields &optional comp)
  2. (format nil "SELECT ~a FROM ~a~[;~; ~a~]"
  3. (dofields 'fields)
  4. (dotables 'tables)
  5. (if comp
  6. (docompare 'comp))))
  7. (defun dofields (fields)
  8. (format nil "~{~a~^, ~}" fields))
  9. (defun dotables (tables)
  10. (format nil "~{~a~^, ~}" tables))