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)
(slot-value csv 'target)))))
(unless transforms
(setf (slot-value csv 'transforms)
(loop for c in columns collect nil)))))
(setf (slot-value csv 'transforms) (make-list (length columns))))))
;;;
;;; 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)
(slot-value fixed 'target)))))
(unless transforms
(setf (slot-value fixed 'transforms)
(loop :repeat (length columns) :collect nil)))))
(setf (slot-value fixed 'transforms) (make-list (length columns))))))
(declaim (inline parse-row))

View File

@ -32,7 +32,7 @@
(slot-value source 'transforms))))
(unless 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)
(:documentation