Commit Graph

16 Commits

Author SHA1 Message Date
Dimitri Fontaine
68aa205db5 Also commit SQLite test case changes.
See #351 for context, this adds a proper test case.
2016-03-03 14:59:57 +01:00
Dimitri Fontaine
973339abc8 Add a SQLite test case from #310. 2015-11-22 22:16:05 +01:00
Dimitri Fontaine
933d1c8d6b Add test case for #302. 2015-10-22 22:35:32 +02:00
Dimitri Fontaine
75727df72f Quote table names when migrating from SQLite, fix #281.
Apparently I just forgot to apply any smartness whatsoever to SQLite
identifiers and just copied them as they are to PostgreSQL. Change that
by calling apply-identifier-case.
2015-08-25 01:13:19 +02:00
Dimitri Fontaine
7e508374c4 Add some SQLite test cases for real type, see #249. 2015-06-16 23:13:52 +02:00
Dimitri Fontaine
c3b5d60542 Fix type declaration to include null values, fix #238.
In passing, add a test case for NIL datetime values in our SQLite sample
database.
2015-05-22 23:49:03 +02:00
Dimitri Fontaine
22f4317a30 Add support for the CAST rule to SQLite sources.
This allows users to benefit from the same flexible machinery when using
SQLite as when using MySQL, and also allows to add some more default
cast rules too.
2014-10-13 00:52:55 +02:00
Dimitri Fontaine
ca52ddacb1 SQLite: transform "0" timestamps to NULL, see #100. 2014-07-30 18:42:49 +02:00
Dimitri Fontaine
ed8022ce64 SQLite: transform default values to their PostgreSQL representation.
When default values are used in SQLite they are of course using their
SQLite representation, which might not be compatible with the PostgreSQL
target data type we're casting to. Make it so that the default values
are transformed too, as we already do in the MySQL case.

See #100.
2014-07-30 16:32:35 +02:00
Dimitri Fontaine
cb4b2a3334 Convert SQLite tinyint to PostgreSQL smallint, fixes #97. 2014-07-18 11:06:37 +02:00
Dimitri Fontaine
6d49d9e10a Add a "real" column test case in SQLite main test, Closes #73. 2014-06-29 16:33:42 +02:00
Dimitri Fontaine
1273c42393 Parse SQLite "unsigned" and "short" noise words, fix #72.
In SQLite it's possible to define columns using type names such as
"smallint unsigned" or "short integer", without any changes to the way
those data types are handled, given its "dynamic typing" features.

Improve the pgloader casting machinery for SQLite to handle those cases.
2014-06-04 11:11:50 +02:00
Dimitri Fontaine
9e12035ca1 Review SQLite blob types in light of "manifest typing", fix #60.
When using SQLite 3, a blob column might return either string of byte
vector values dynamically depending on the data itself, or maybe some
more complex parameters controlled at data insert time.

Hard-code the rule that a blob column returned as a string is in fact
base64 encoded (which looks like common practice) and decode it
automatically when needed, before sending to byte-vector-to-bytea. It
might be a tad slow but at least the data is properly converted.

In future, that decision might come and byte us in the back again, at
which point it'll be necessary to consider full casting options as in
the MySQL CAST rules. It seems like a big enough win for now if we can
avoid that.
2014-05-16 23:13:57 +02:00
Dimitri Fontaine
39af63b053 Implement support for SQLite blob to bytea, fixes #59.
This issue has been re-opened with blob instead of double. Semi-blindly
implement support for the blob type with an image data type.

Disturbingly enough when tested with non-binary data SQLite was
returning strings rather than byte vectors, tripping up the transform
function that sure expects byte vectors.
2014-05-16 00:28:02 +02:00
Dimitri Fontaine
d6c457d89a Add support for SQLite "double" data type, Fix #59.
This time with a test case rather than trying to blindly address the
problem in a very small amount of time.
2014-05-15 23:28:21 +02:00
Dimitri Fontaine
6a6684bd8b Desultory improve the SQLite importer. 2013-11-21 21:34:02 +01:00