SQLite Forum

Type of the column
Login
Hi, ALL,

From the documentation:

[quote]
The sqlite3_column_type() routine returns the datatype code for the initial data type of the result column. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. The return value of sqlite3_column_type() can be used to decide which of the first six interface should be used to extract the column value. The value returned by sqlite3_column_type() is only meaningful if no automatic type conversions have occurred for the value in question. After a type conversion, the result of calling sqlite3_column_type() is undefined, though harmless. Future versions of SQLite may change the behavior of sqlite3_column_type() following a type conversion.
[/quote]

However, there are 2 types/functions there: sqlite3_column_int() and sqlite3_column_int64().

Do I understand correctly that the second one exist for 64-bit builds? If not - shouldn't there be SQLITE_INTEGER and SQLITE_INTEGER64?

Or is there a better way to distinguish? Or I should be using _int4() all the time?

Please advice.

Thank you.