The Useless Use Of Loop did strike.

This commit is contained in:
Dimitri Fontaine 2014-05-03 15:55:02 +02:00
parent ad18c5370d
commit 267a1cc755
3 changed files with 3 additions and 5 deletions

View File

@ -46,8 +46,7 @@
(pgloader.pgsql:list-columns (slot-value csv 'target-db) (pgloader.pgsql:list-columns (slot-value csv 'target-db)
(slot-value csv 'target))))) (slot-value csv 'target)))))
(unless transforms (unless transforms
(setf (slot-value csv 'transforms) (setf (slot-value csv 'transforms) (make-list (length columns))))))
(loop for c in columns collect nil)))))
;;; ;;;
;;; Read a file format in CSV format, and call given function on each line. ;;; Read a file format in CSV format, and call given function on each line.

View File

@ -28,8 +28,7 @@
(pgloader.pgsql:list-columns (slot-value fixed 'target-db) (pgloader.pgsql:list-columns (slot-value fixed 'target-db)
(slot-value fixed 'target))))) (slot-value fixed 'target)))))
(unless transforms (unless transforms
(setf (slot-value fixed 'transforms) (setf (slot-value fixed 'transforms) (make-list (length columns))))))
(loop :repeat (length columns) :collect nil)))))
(declaim (inline parse-row)) (declaim (inline parse-row))

View File

@ -32,7 +32,7 @@
(slot-value source 'transforms)))) (slot-value source 'transforms))))
(unless transforms (unless transforms
(setf (slot-value source 'transforms) (setf (slot-value source 'transforms)
(loop for c in (slot-value source 'columns) collect nil)))))) (make-list (length (slot-value source 'columns))))))))
(defgeneric map-rows (source &key process-row-fn) (defgeneric map-rows (source &key process-row-fn)
(:documentation (:documentation