Commit Graph

9 Commits

Author SHA1 Message Date
Dimitri Fontaine
b403c40d30 Implement support for MySQL comments, fix #126.
Only table (BASE TABLE) and columns comments are supported now. I didn't
even try to see if more are possible and interesting to support.
2015-01-09 01:49:56 +01:00
Dimitri Fontaine
302a7d402b Refactor connection handling, and clean-up many things.
That's the big refactoring patch I've been sitting on for too long.

First, refactor connection handling to use a uniformed "connection"
concept (class and generic functions API) everywhere, so that the COPY
derived objects just use that in their :source-db and :target-db slots.

Given that, we don't need no messing around with *pgconn* and *myconn-*
and other special variables at all anywhere in the tree.

Second, clean up some oddities accumulated over time, where some parts
of the code didn't get the memo when new API got into place.

Third, fix any other oddity or missing part found while doing those
first two activities, it was long overdue anyway...
2014-12-26 21:50:29 +01:00
Dimitri Fontaine
5b726e47a0 Improve error reporting on connection error. 2014-12-19 14:24:35 +01:00
Dimitri Fontaine
d4cab3a81e Fix MSSQL index and foreign key names.
First, the index names in MS SQL, as in MySQL, are only unique per
table, whereas they need to be globally unique (per database) in
PostgreSQL. So reuse the infrastructure we had for MySQL here.

Second, the way we trick table names in index and fkey structures means
that we already did quote the names and we don't want to quote them
again, so add a new possible *identifier-case* value to handle the case
where nothing is to be done, pretty please.
2014-11-25 00:42:37 +01:00
Dimitri Fontaine
f263d1b2a4 Implement Foreign Key support for MSSQL.
Piggyback as much as possible on the work already done for MySQL.
2014-11-24 23:42:19 +01:00
Dimitri Fontaine
5ce92492ce Cast MySQL default values in some cases, fixing #124.
When querying the default values of MySQL tables against MySQL catalogs,
the default value is always returned as a string. When the column having
the default actually is a "binary" column, we want the transformation
functions to receive a proper vector of bytes.

This patch adds some hard-coded rules to be smarted about the situation
for columns of type "binary".
2014-11-22 00:04:34 +01:00
Dimitri Fontaine
5b87b1a85e Refactor *identifier-case* option into a dynamic binding.
That makes it much easier to use from about anywhere in the code, which
is what is needed. In passing, fix #129.
2014-11-21 23:32:02 +01:00
Dimitri Fontaine
e2f6dba107 Force package names to be read in the KEYWORD package. 2014-11-10 01:17:06 +01:00
Dimitri Fontaine
2369a142a7 Refactor source code organisation.
In passing, fix a bug in the previous commit where left-over code would
cancel the whole new parsing code for advanced source fields options.
2014-10-01 23:20:24 +02:00