mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
22 lines
508 B
Common Lisp
22 lines
508 B
Common Lisp
;;;
|
|
;;; Tools to handle MySQL data fetching
|
|
;;;
|
|
|
|
(defpackage #:pgloader.csv
|
|
(:use #:cl)
|
|
(:export #:*csv-path-root*
|
|
#:get-pathname))
|
|
|
|
(in-package :pgloader.csv)
|
|
|
|
(defparameter *csv-path-root*
|
|
(merge-pathnames "csv/" (user-homedir-pathname)))
|
|
|
|
(defun get-pathname (dbname table-name)
|
|
"Return a pathname where to read or write the file data"
|
|
(make-pathname
|
|
:directory (pathname-directory
|
|
(merge-pathnames (format nil "~a/" dbname) *csv-path-root*))
|
|
:name table-name
|
|
:type "csv"))
|