I know that I am going to make things worse here.
Before I start, is there anyone who still pushes for two-value? rtype and theducks voted for, but rtype has (mostly) changed votes. I ask because although I have implemented the tweak, its existence does complicate things. "Someone" will need to explain its existence, which might be harder than explaining tri-state columns.
Quote:
Originally Posted by Starson17
Why am I so confused? If the default value is null on a Y/N column, isn't it tri-valued? Are you just thinking of whether it can be set to null after it was previously set to Y or N, or do you mean that null=N or are you just thinking of display issues?
|
One must separate storage from behavior. Some columns in calibre can be Null, but that fact is effectively hidden from the user. For example, Null Comments fields are indistinguishable from those that contain an empty string, including for the :false search.
What is being debated is the behavior for Null for boolean columns. The answer seems to be 'let me choose'.
If the user chooses two-value, then the behavior of No and Null become indistinguishable, just as the empty string and Null are indistinguishable for Comments.
Quote:
Quote:
for int columns, columns set to a value will sort before columns never set (blank), and I expect that people will think that this behavior is correct. The same is true for the various text fields.
|
Exactly. I'm more confused. Shouldn't the Y/N column behave this way, too? In which case it would be tri-valued wouldn't it?
|
That was why I asked the question. Note that we are discussing behavior: make it DoWhatIMean, not something IDon'tMean.
Quote:
Quote:
As I said, the default value for every column is None.
|
Which makes it ...
|
I lied. Currently most columns do have a value set, so they are never Null.
That being said, don't confuse what is in the table with behavior the user sees. Calibre has for some time treated :false as matching anything that evaluates to zero, including Null, empty strings, and zero values. For example, try 'rating:false'. You will get columns that you edited to zero.
Quote:
Aha - You're just not going to let the average user search for "false" and find anything? Or are you still going to allow that, but have a search for No pull up the internally saved null as well as No?
|
In two-value mode, all of 'false', no', and unchecked' match Null columns or columns with false in them. All of 'true', 'yes', and 'checked' will match columns with true in them.
I ask again: is there anyone who still strongly thinks that two-valued columns should be offered, and even more important, that they should be the default? One reason I ask is that I polled my several people, technical and non-technical, and all of them said that they expected the behavior to support 'I set it to checked', 'I set it to unchecked', and 'I haven't set it yet' (trivalue). I am very nervous about the two-value default.