From 9bd93cd0ccb7400a4f6f3916e434d86c28ad2e25 Mon Sep 17 00:00:00 2001 From: bielow Date: Mon, 21 Nov 2022 22:34:21 +0100 Subject: [PATCH] extend docs on column type --- include/SQLiteCpp/Column.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/SQLiteCpp/Column.h b/include/SQLiteCpp/Column.h index f318d4e..8fee096 100644 --- a/include/SQLiteCpp/Column.h +++ b/include/SQLiteCpp/Column.h @@ -31,7 +31,7 @@ extern const int Null; ///< SQLITE_NULL /** * @brief Encapsulation of a Column in a row of the result pointed by the prepared Statement. * - * A Column is a particular field of SQLite data in the current row of result + * A Column is a particular field of SQLite data in the current row of result * of the Statement : it points to a single cell. * * Its value can be expressed as a text, and, when applicable, as a numeric @@ -103,9 +103,12 @@ public: std::string getString() const; /** - * @brief Return the type of the value of the column + * @brief Return the type of the value of the column using sqlite3_column_type() * * Return either SQLite::INTEGER, SQLite::FLOAT, SQLite::TEXT, SQLite::BLOB, or SQLite::Null. + * This type may change from one row to the next, since + * SQLite stores data types dynamically for each value and not per column. + * Use Statement::getColumnDeclaredType() to retrieve the declared column type from a SELECT statement. * * @warning After a type conversion (by a call to a getXxx on a Column of a Yyy type), * the value returned by sqlite3_column_type() is undefined.