Fix error counts when transformation functions fail.

Related to #249, stop reporting 0 errors on sources where we failed to
handle some data transformation.
This commit is contained in:
Dimitri Fontaine 2015-06-27 19:32:08 +02:00
parent 5f85bf542a
commit 1f7382cd0d
2 changed files with 6 additions and 2 deletions

View File

@ -209,7 +209,10 @@
#:format-vector-row)
(:import-from #:pgloader.sources
#:map-rows
#:transforms)
#:transforms
#:target)
(:import-from #:pgloader.utils
#:pgstate-incf)
(:export #:map-push-queue))

View File

@ -54,7 +54,8 @@
(incf count)))
(condition (e)
(log-message :error "~a" e))))
(log-message :error "~a" e)
(pgstate-incf *state* (target copy) :errs 1))))
(defun map-push-queue (copy queue &optional pre-formatted)
"Apply MAP-ROWS on the COPY instance and a function of ROW that will push