Paul Lefebvre wrote:
[SQLite does not have a Boolean data type. Since Real Studio does have a Boolean data type, it has to be converted to something SQLite can handle. The two choices are to use an INTEGER column and store 0 or 1 or to use a TEXT column and save the text as "true" or "false".And THAT's what annoys me so immensly about the documentation.
Why can't it simply say that? Instead it contains:
When using the DatabaseField.BooleanValue property to retrieve a column value, 0 is treated as False and 1 is treated as True. Other values are undefined when retrieved using BooleanValue.
DatabaseField.StringValue, on the other hand, should be able to retrieve the original data if it can't be identified as a Boolean. If the Real SQL Database can identify the value as a boolean, however, then "False" will always return False and "True" will always return True, regardless of how those values are stored in the database.
This is a side effect of the way in which database engines interact with the database API in the Real Studio framework. Note that this behavior only applies when you store non-Boolean data in a column defined as Boolean.
The following table contains information about the data types used by SQLite
Boolean Stores the values of TRUE or FALSE.
When retrieved by DatabaseField.BooleanValue, "0" and "False" are interpreted as False and "1" and "True" are interpreted as True. All other values are not defined. When retrieved by DatabaseField.StringValue, other non-Boolean values in a Boolean field may retrieved successfully.
no example of a boolean value at all anywhere.
Thanks for finally an answer. But really, WHO wrote that documentation???