Revert "Remove special treatment of tag:none"

This reverts commit 95285ef66d02d9d3f0d560f70514b16e8a2f7bf5.
This commit is contained in:
Henrik Giesel 2021-06-16 08:49:57 +02:00 committed by Damien Elmes
parent 3aebae9f13
commit b8142d33c8

View File

@ -195,6 +195,9 @@ impl SqlWriter<'_> {
write!(self.sql, "false").unwrap();
} else {
match text {
"none" => {
write!(self.sql, "n.tags = ''").unwrap();
}
"*" => {
write!(self.sql, "true").unwrap();
}
@ -758,6 +761,7 @@ mod test {
vec![r"(?i).* o\S*n\*et%w%oth\Sre_e(::| ).*".into()]
)
);
assert_eq!(s(ctx, "tag:none"), ("(n.tags = '')".into(), vec![]));
assert_eq!(s(ctx, "tag:*"), ("(true)".into(), vec![]));
// state