Home » U++ Library support » U++ SQL » BOOL in SQLite
BOOL in SQLite [message #52086] |
Wed, 17 July 2019 14:00 |
borbek
Messages: 31 Registered: November 2010 Location: Russia
|
Member |
|
|
Hi!
In Sqlite3Schema.h BOOL replaces by TEXT:
#define BOOL(x) COLUMN("text", bool, x, 0, 0)
#define BOOL_ARRAY(x, items) COLUMN_ARRAY("text", bool, x, 0, 0, items)
#define BOOL_(x) COLUMN_("text", bool, x, 0, 0)
#define BOOL_ARRAY_(x, items) COLUMN_ARRAY_("text", bool, x, 0, 0, items)
but in sqlite, the boolean is an integer 0 or 1, so, IMHO, it is right:
#define BOOL(x) COLUMN("integer", bool, x, 0, 0)
#define BOOL_ARRAY(x, items) COLUMN_ARRAY("integer", bool, x, 0, 0, items)
#define BOOL_(x) COLUMN_("integer", bool, x, 0, 0)
#define BOOL_ARRAY_(x, items) COLUMN_ARRAY_("integer", bool, x, 0, 0, items)
"
3.1. No Separate BOOLEAN Datatype
Unlike most other SQL implementations, SQLite does not have a separate BOOLEAN data type. Instead, TRUE and FALSE are (normally) represented as integers 1 and 0, respectively.
"
|
|
|
Goto Forum:
Current Time: Sun Apr 28 16:09:21 CEST 2024
Total time taken to generate the page: 0.06075 seconds
|