On 30 Mar 2018, at 11:22am, Eric Grange <zar...@gmail.com> wrote: > Is there a way to have sqlite3_column_decltype return the affinity for an > expression ?
You may be referring to sqlite3_column_type() which can be applied to columns returned by a query even if that column is an expression. But if you want to do it accurately for every row it can't be done at the column level, because an expression has a datatype and not an affinity, and different rows of the same expression might have a different type: SELECT month, CASE weekday WHEN 6 THEN 'weekend' WHEN 7 THEN 'weekend' ELSE weekday END FROM deliverydates; To handle that properly I think you'd have to call sqlite3_value_type() for each value returned. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users