[fdo-internals] FDO RFC 16 - FDO Provider for SQLite

Frank Warmerdam warmerdam at pobox.com
Wed Apr 23 00:54:12 EDT 2008

Traian Stanev wrote:
> Yes, so the problem is that the type mapping code had an incomplete set of
> data types -- it assumed that SQLite reports data types that are already
> mapped to SQLite affinities, while in fact it returns whatever was in the
> raw SQL that created the table. In this case, VARCHAR and FLOAT, instead of
> TEXT and REAL respectively. I'm going to add some more types that I got off
> the SQLite documentation, but will still return an invalid value (-1) if the
> type cannot be mapped, in order to catch more type mapping problems as we
> get more sample data. I was tempted to return Int32 if the type cannot be
> mapped, but decided it would be just a tad too reckless to do so.


Would it make more sense to treat anything not otherwise recognised as
text?  That is how it is all stored in the database anyways.

I can see that the types I'm applying may be somewhat perverse.  That's the
problem with sqlite being essentially typeless, there is nothing there helping
different software packages use consistent types!

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the fdo-internals mailing list