mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 15:27:00 +02:00
Adapt to the new cl-ixf API.
This allows fixing bugs in processing the IXF files, which pgloader directly benefits from.
This commit is contained in:
parent
a0dc59624c
commit
a195ac6dd4
@ -67,8 +67,7 @@
|
||||
|
||||
(defun list-all-columns (ixf-stream table-name)
|
||||
"Return the list of columns for the given IXF-FILE-NAME."
|
||||
(let ((ixf:*ixf-stream* ixf-stream))
|
||||
(let ((ixf (ixf:read-headers)))
|
||||
(list (cons table-name
|
||||
(coerce (ixf:ixf-table-columns (ixf:ixf-file-table ixf))
|
||||
'list))))))
|
||||
(ixf:with-ixf-stream (ixf ixf-stream)
|
||||
(list (cons table-name
|
||||
(coerce (ixf:ixf-table-columns (ixf:ixf-file-table ixf))
|
||||
'list)))))
|
||||
|
@ -59,12 +59,12 @@
|
||||
"Extract IXF data and call PROCESS-ROW-FN function with a single
|
||||
argument (a list of column values) for each row."
|
||||
(with-connection (conn (source-db copy-ixf))
|
||||
(let ((ixf:*ixf-stream* (conn-handle conn)))
|
||||
(let ((ixf (ixf:read-headers))
|
||||
(row-fn (lambda (row)
|
||||
(pgstate-incf *state* (target copy-ixf) :read 1)
|
||||
(funcall process-row-fn row))))
|
||||
(ixf:map-data ixf row-fn)))))
|
||||
(let ((ixf (ixf:make-ixf-file :stream (conn-handle conn)))
|
||||
(row-fn (lambda (row)
|
||||
(pgstate-incf *state* (target copy-ixf) :read 1)
|
||||
(funcall process-row-fn row))))
|
||||
(ixf:read-headers ixf)
|
||||
(ixf:map-data ixf row-fn))))
|
||||
|
||||
(defmethod copy-to-queue ((ixf copy-ixf) queue)
|
||||
"Copy data from IXF file FILENAME into queue DATAQ"
|
||||
|
Loading…
Reference in New Issue
Block a user