Overview
Features
Download
Documentation
Community
Add-Ons & Services

Misinterpreted SQLite/ODBC data types

Please post support and help requests here.

Misinterpreted SQLite/ODBC data types

Postby Javaddiction » 19 Jan 2009, 15:19

I'm working with some code that stores data to a SQLite database using Poco::Data::SQLite. The database file needs to be compatible with other SQLite wrappers (like the SQLite ADO.NET wrapper "System.Data.SQLite"). SQLite is supposed to allow declaring arbitrary data types for columns in table definitions.

My problem is that I have a column that needs to be declared with a boolean flavor (BIT/BOOL/YESNO) so that the wrapper will correctly interpret its type, but it appears that in Poco::Data::SQLite::Utility::getColumnType(), only a handful of known or undeclared types are supported. Unsupported types are met with a nasty Poco::NotFoundException which is currently a show-stopper for me. Therefore I have two questions:

1) Would it be possible to either interpret a few more types, or at least utilize something like a default or the "sqlite_column_type" function to deduce the data type? The types that I'm trying to be senstive to can be found at http://sqlite.phxsoftware.com/forums/p/31/76.aspx#76.
2) Is it a violation of the Poco licensing to modify my local copy of the Poco source code to add this type of change/improvement?

Thanks.
Javaddiction
 
Posts: 2
Joined: 19 Jan 2009, 14:56

Re: Misinterpreted SQLite/ODBC data types

Postby alex » 19 Jan 2009, 23:27

Javaddiction wrote:1) Would it be possible to either interpret a few more types, or at least utilize something like a default or the "sqlite_column_type" function to deduce the data type?


I'd be in favor of doing that. I propose you think it through and file a Sourceforge feature request or patch.

Javaddiction wrote:2) Is it a violation of the Poco licensing to modify my local copy of the Poco source code to add this type of change/improvement?


You did not notice that nasty FBI warning when you downloaded the code!!!??? If they did not storm your home yet, they're surely on the way (either them or CIA, if you are outside U.S.), so I suggest you immediately stop whatever you are doing, low-level format your hard drive, then smash it to pieces with a sledge hammer, throw it in your neighbor's trash can, roll over and play dead, lest you end up caged in a sunny place down in Cuba ;-)

OK, that was a joke :-). Now for real - you can do with POCO code whatever you heart's desire is, including starting your own fork of POCO - the only limit is that it must be named something else - which some folks have threatened to do but nobody did yet. Of course, we always prefer if interested parties collaborate with us to improve the framework for mutual benefit. So, file a concrete proposal as a SF tracker item and we'll talk about it.
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest