Commit Graph

26 Commits

Author SHA1 Message Date
Dimitri Fontaine
c108b85290 Allow package prefix in CAST ... USING clause.
Also, in passing, ass a new transformation function for MySQL allowing
to transform from varbinary to text.
2016-02-04 16:09:22 +01:00
Dimitri Fontaine
44a2bd14d4 Fix custom CAST rules with expressions, fix #322.
In a previous commit the typemod matching code had been broken, and we
failed to notice that until now. Thanks to bug report #322 we just got
the memo...

Add a test case in the local-only MySQL database.

The regression testing facilities should be improved to be able to test
a full database, and then to dynamically create said database from code
or something to ease test coverage of those cases.
2016-01-12 14:55:17 +01:00
Dimitri Fontaine
573a63cd3a Add a local test, per #271. 2015-08-24 16:42:39 +02:00
Dimitri Fontaine
7d2d09ce68 Add the option to preserve MySQL index names, fix #187.
See test/parse/hans.goeuro.load for an example usage of the new option.

In passing, any error when creating indexes is now properly reported and
logged, which was missing previously. Oops.
2015-03-07 20:19:47 +01:00
Dimitri Fontaine
48f451bdbc Implement the option to disable triggers when loading data.
This option is dangerous and allows to skip ALL triggers when loading
data against PostgreSQL. This includes foreign key constraints
definitions and will allow loading data out of order.

When using both the options "create no table" and "disable triggers" it
will be possible to load data into a schema prepared by your favorite
external tool, at the cost of not validating FK constraints. Use with
care.

Fix #167.
2015-02-19 15:05:10 +01:00
Dimitri Fontaine
a3b68bb80a Random test load file cleanup. 2015-01-15 17:49:19 +01:00
Dimitri Fontaine
87e157bee2 Add a new database source type in the parser.
Now it's possible to parse a command to load data from MS SQL. The
parser was until now parsing all database URI within the same common
rule and that isn't possible anymore if we want to distinguish in
between source database right from the parser, which we actually want to
do.

This patch also implement in-passing fixes all over the place, including
the transformation function float-to-string that only happened to work
on double-float data.
2014-11-17 00:23:06 +01:00
Dimitri Fontaine
8a0c91fa40 Fix conjunctions for the INCLUDING clause in MySQL.
We want all table matching any of the given constraints (regexp or
equality search).
2014-09-23 16:44:38 +02:00
Dimitri Fontaine
53a7e47058 New MySQL default Cast Rule for bit(1) to boolean, fix #93.
We need a new transformation function that work with a vector of
integers as input.
2014-07-03 11:47:59 +02:00
Dimitri Fontaine
2ac374bcc8 Improve internal testing a bit.
This should get into a full reproducible regression test against MySQL
some day.
2014-06-25 12:43:57 +02:00
Dimitri Fontaine
7db001a7c3 Allow the MySQL command parser to process clauses in any order, fix #56.
Only the MySQL command is addressed in this patch, because the code
level approach is not safisfying me completely. It might be easier to
just bite the bullet and review all the optional clauses return values
rather than add a layer as this patch does.

The feature still is available for MySQL given this patch, so let's push
it, get feedback, then see about how to make the approach scale and
revise all the other commands.
2014-06-15 14:19:38 +02:00
Dimitri Fontaine
ee498111bc Implement MySQL local (socket) connection. Fix #39.
The parser was happily parsing such a connection string as the
following, but the rest of the code didn't really know what to do about
it:

  mysql://unix:/var/run/mysqld/mysqld.sock:/main

In passing, fix bugs where the PostgreSQL unix domain socket connection
was still shy of a brick load, omitting to consider the case where the
connection host is actually a list of '(:unix . "path/to/socket").
2014-05-02 22:48:17 +02:00
Dimitri Fontaine
9084a01086 Switch a test case to the "utf-8" spelling.
The spelling "utf8" is not recognized by CCL.
2014-04-29 15:24:12 +02:00
Dimitri Fontaine
56f3da28ed Fix #20 by skipping table and view missing from the catalogs. 2014-03-04 14:01:04 +01:00
Dimitri Fontaine
46fd6632f2 Fix #40 by providing a per-table forced-encoding option.
This patch takes benefits from the recent patch
62fc85a1cf
so that you will need to freshen your local Qmynd copy if you want to
test from sources.
2014-03-03 23:39:22 +01:00
Dimitri Fontaine
b033aed88b Some more testing. 2014-03-02 01:27:02 +01:00
Alexander Pánek
97109153f4 Removed tinyint cast rule
This rule has overridden the default rule for `tinyint(1)` and instead of placing `boolean`, it kept the typemod and placed `boolean(1)` into the resulting query.
2014-02-17 16:14:27 +01:00
Dimitri Fontaine
c56bbab0c4 Fix #24 by allowing cast rules adding only transformation functions. 2014-01-20 16:00:09 +01:00
Dimitri Fontaine
80b6c46aae Version 3.0.97. 2014-01-15 22:53:43 +01:00
Dimitri Fontaine
fb54d19357 Review some default casting rules, in particular add tinyint(1) to boolean. 2013-11-18 10:28:38 +01:00
Dimitri Fontaine
b31ccded6f Implement per-column MySQL CAST rules. 2013-11-18 10:12:43 +01:00
Dimitri Fontaine
8fa7a86013 Implement typemod and default guards in the MySQL CAST clause. 2013-11-17 22:33:06 +01:00
Dimitri Fontaine
718ac80560 Implement a Materiaze Views option for MySQL. 2013-11-16 21:41:07 +01:00
Dimitri Fontaine
00d3886ba6 Fix the goeuro local only test case. 2013-11-13 22:35:45 +01:00
Dimitri Fontaine
2f6c7677fc Fix "reset sequences" option to only target just loaded tables. 2013-10-21 23:15:24 +02:00
Dimitri Fontaine
89aaabd179 Port tests from pgloader 2.x, implement trailing-sep. 2013-10-13 22:10:07 +02:00