> On Mar 15, 2018, at 11:20 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > It's possible, with a lot of work, to figure out whether the columns in a > table were defined as having type BOOLEAN. IF you want to do this tell us > and we'll tell you how. However, if you are doing a calculation in a SELECT > like > > SELECT name,(membershipType == 'y') FROM Members > > The values returned will be 0 or 1 and there will be no way to tell that > SQLite did a boolean calculation to return that result.
To jump in here: This is also a problem for certain uses of the JSON1 extension, since JSON data does distinguish between true/false and 1/o. An application may need to know whether a query result is a JSON number or a boolean, for example. It’s on my to-do list to figure out a good way to do this. I see that some limited boolean support is coming in 3.23; it would be nice if boolean could be elevated to a data type, or at least if integer column values in a query could be tagged to indicate that they originated as booleans. —Jens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users