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

Jason Birch Jason.Birch at nanaimo.ca
Wed Apr 23 00:59:13 EDT 2008

Sweet, those type mapping fixes meant that I got previews of points, lines, and polygons from both WKT and WKB files.
The way SQLite handles types is a little scary.  You might get something like CHARLIE back at some point and be expected to deal with it as CHAR (I think this is the reason that VARCHAR works) :)


From: Traian Stanev
Subject: RE: [fdo-internals] FDO RFC 16 - FDO Provider for SQLite

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.

More information about the fdo-internals mailing list