Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Generic Function API for Materialized Views support. #970
Conversation
Implement a generic-function API to discover the source database schema and populate pgloader internal version of the catalogs.
Cut down three copies of about the same code-path down to a single shared one, thanks to applying some amount of OOP to the code.
| (:documentation "pgloader connection parameters for DBF files.")) | ||
| (defclass copy-db3 (db-copy) | ||
| ((encoding :accessor encoding ; file encoding | ||
| :initarg :encoding)) |
phoe
May 19, 2019
Collaborator
This line mixes tabs and spaces.
This line mixes tabs and spaces.
dimitri
May 19, 2019
Author
Owner
It's my Emacs setup that does that, I think. And I think it's just standard SLIME setup here. In other words I don't mind too much about that.
It's my Emacs setup that does that, I think. And I think it's just standard SLIME setup here. In other words I don't mind too much about that.
- Some initialize-instance :after left over code can be removed.
The casting nowadays happens within the catalogs rather than the COPY
objects, and the copy objects are derived from the preparation work we
do on the catalogs. The casting machinery is called in process-catalog
in src/load/migrate-database.lisp
- It's more lisp-idiomatic to benefit from loop features when using loop
anyway, so rather than using let to bind values inside the body of the
loop we can with :with var := instead.
- Fix some copy/paste'os in MS SQL where we still referenced MySQL.
This comment has been minimized.
This comment has been minimized.
|
AFAIK these |
This comment has been minimized.
This comment has been minimized.
|
Ditto. |
This comment has been minimized.
This comment has been minimized.
|
Now that I look at it, however, I kind of wonder if keeping the |
Move the (format nil "sql" arg1 arg2) into the SQL function, which makes more sense on an abstraction layer pespective and makes the calling code easier to read.
This comment has been minimized.
This comment has been minimized.
|
This may signal a type error. |
This comment has been minimized.
This comment has been minimized.
|
Fixed. |
Thanks, good spot! Fixed now! |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Generalize support code for Materialized Views support, as it is about the same for the three databases where we have support for it.