You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, I don't understand why empty string "" and nil both return the values that have populated Label fields but not the one that has an empty Label field. Shouldn't it be the other way around?
The text was updated successfully, but these errors were encountered:
Hmm, this one is tricky, since we never defined what will happen with empty values.
Definitely, the returns don't make any sense from user's point of view. I think LabelContext is trying to be nil-safe and ignores the empty argument in the last two cases.
I think we should enforce the following behavior:
LabelContext("") - list none (it searches for a typed empty string)
LabelContext(quad.IRI("")) - list none (it searches for an empty IRI)
LabelContext(quad.Raw("")) - list node2 (same as nil)
LabelContext(nil) - list node2 (what you would expect)
The problem is that we need to check the code to make sure it doesn't expect something like this to work:
varlabel quad.Valueifsomething {
label=quad.IRI("x")
}
// expects that if label is nil, the filter will be skippedp=p.LabelContext(label)
Example program:
None of these successfully limit to just the quad with the empty Label:
How can I do that?
Additionally, I don't understand why empty string "" and nil both return the values that have populated Label fields but not the one that has an empty Label field. Shouldn't it be the other way around?
The text was updated successfully, but these errors were encountered: