Boolean logic page error


#1

This page has an error:
https://docs.couchbase.com/server/4.0/n1ql/n1ql-language-reference/booleanlogic.html

This is the table that it shows:

A B A and B A or B
FALSE FALSE FALSE FALSE
TRUE TRUE TRUE TRUE
FALSE TRUE FALSE TRUE
NULL FALSE NULL TRUE
NULL NULL TRUE NULL
NULL NULL NULL FALSE
MISSING FALSE MISSING TRUE
MISSING MISSING TRUE NULL
MISSING MISSING NULL MISSING

There are two NULL,NULL rows and two MISSING,MISSING rows. My guess is that the first NULL,NULL row and the first MISSING,MISSING row should be NULL,TRUE and MISSING,TRUE respectively. But it could be worth rechecking the whole table to make sure.


#2

Oh also there’s no MISSING,NULL row.


#3

I found an updated table:
https://docs.couchbase.com/server/5.5/n1ql/n1ql-language-reference/logicalops.html


#4

Also for those who care it could be worth noting that the logic is the following:

AND = MIN where
TRUE > NULL > FALSE > MISSING

OR = MAX where
TRUE > MISSING > NULL > FALSE


#5

Correct tables are ( Appendix - Four-valued logic)