SQLITE3_COLUMN_DECLTYPE(3) | Library Functions Manual | SQLITE3_COLUMN_DECLTYPE(3) |
sqlite3_column_decltype
,
sqlite3_column_decltype16
—
sqlite3_column_decltype
(sqlite3_stmt*,
int);
const void *
sqlite3_column_decltype16
(sqlite3_stmt*,
int);
For example, given the database schema:
CREATE TABLE t1(c1 VARIANT);
and the following statement to be compiled:
SELECT c1 + 1, c1 FROM t1;
this routine would return the string "VARIANT" for the second result column (i==1), and a NULL pointer for the first result column (i==0).
SQLite uses dynamic run-time typing. So just because a column is declared to contain a particular type does not mean that the data stored in that column is of the declared type. SQLite is strongly typed, but the typing is dynamic not static. Type is associated with individual values, not with the containers used to hold those values.
December 19, 2018 | NetBSD 9.0 |