[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-25 Thread James K. Lowden
On Mon, 17 Aug 2015 17:19:49 +0200 Olivier Barthelemy wrote: > CREATE TABLE VariableDetails (dtl_id INTEGER PRIMARY KEY ASC > AUTOINCREMENT, storage_implicit BOOLEANCHECK (storage_implicit = > 'true' OR storage_implicit = 'false'), storage_type TEXT NOT NULL); > > Insert statement > INSERT INTO

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Simon Slavin
On 17 Aug 2015, at 5:08pm, Olivier Barthelemy wrote: > As stated in the second question of my first message, shouldn't there be > some check in sqlite that the type in the constraints are compatible with > the fields, with an error at table creation? SQLite allows what was done, on purpose. F

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread R.Smith
On 2015-08-17 06:08 PM, Olivier Barthelemy wrote: > OK, > I already had removed my constraint as it is, since it is obviously invalid > > So for me : > Am i right to leave a constraint, say CHECK (varname=0 OR varname=1), to > avoid other integer values, or is the constraint useless? (i guess the

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Olivier Barthelemy
OK, I already had removed my constraint as it is, since it is obviously invalid So for me : Am i right to leave a constraint, say CHECK (varname=0 OR varname=1), to avoid other integer values, or is the constraint useless? (i guess the answer will be 'it depends on your code' :-P) And for sqlite

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Olivier Barthelemy
The missing space is a copy paste error. And the table IS getting created. Only the insertion fails. sqlite return code is 19 (/* Abort due to constraint violation */). > SQLite has no such type I see nothing in Qt code that converts BOOLEAN in NUMERIC or anything else. The statement is passed a

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Stephan Beal
On Mon, Aug 17, 2015 at 5:19 PM, Olivier Barthelemy < barthelemy at geovariances.com> wrote: > Create statement : > CREATE TABLE VariableDetails (dtl_id INTEGER PRIMARY KEY ASC AUTOINCREMENT, > storage_implicit BOOLEANCHECK (storage_implicit = 'true' OR > storage_implicit = 'false'), storage_type

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Olivier Barthelemy
>From my logs : Create statement : CREATE TABLE VariableDetails (dtl_id INTEGER PRIMARY KEY ASC AUTOINCREMENT, storage_implicit BOOLEANCHECK (storage_implicit = 'true' OR storage_implicit = 'false'), storage_type TEXT NOT NULL); Insert statement INSERT INTO VariableDetails (storage_implicit, stor

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Tim Streater
On 17 Aug 2015 at 16:50, Olivier Barthelemy wrote: >> SQLite has no such type > I see nothing in Qt code that converts BOOLEAN in NUMERIC or anything else. > The statement is passed as is to sqlite. > On previously created sqlite files, when i open then in sqlite manager > addon of Firefox, t

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Simon Slavin
On 17 Aug 2015, at 4:50pm, Olivier Barthelemy wrote: >> SQLite has no such type > > I see nothing in Qt code that converts BOOLEAN in NUMERIC or anything else. > The statement is passed as is to sqlite. SQLite is interpreting BOOLEAN as NUMERIC. See the last line of the table in section 2.2

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Simon Slavin
On 17 Aug 2015, at 4:19pm, Olivier Barthelemy wrote: > Create statement : > CREATE TABLE VariableDetails (dtl_id INTEGER PRIMARY KEY ASC AUTOINCREMENT, > storage_implicit BOOLEANCHECK (storage_implicit = 'true' OR > storage_implicit = 'false'), storage_type TEXT NOT NULL); [I assume there is a

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Stephan Beal
On Mon, Aug 17, 2015 at 2:12 PM, Olivier Barthelemy < barthelemy at geovariances.com> wrote: > I have been using for a while the boolean constraint "CHECK (varname='true' > OR varname='false')" when creating tables with boolean fields and had no > issues in Qt 4.8.6 (sqlite 3.7.7.1) > This looks

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Olivier Barthelemy
Hi, I have been using sqlite through Qt. I have been using for a while the boolean constraint "CHECK (varname='true' OR varname='false')" when creating tables with boolean fields and had no issues in Qt 4.8.6 (sqlite 3.7.7.1) Now i am trying to port to Qt 5.4.2 (sqlite 3.8.6). I can load alread

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-17 Thread Richard Hipp
On 8/17/15, Olivier Barthelemy wrote: > Hi, > > I have been using sqlite through Qt. > > I have been using for a while the boolean constraint "CHECK (varname='true' > OR varname='false')" when creating tables with boolean fields and had no > issues in Qt 4.8.6 (sqlite 3.7.7.1) > > Now i am trying