[haiku-development] Re: BFS query issues

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 10 Apr 2017 09:43:49 +0200

Am 10/04/2017 um 02:39 schrieb Alexander G. M. Smith:

Any chance of an operator which tests for the presence of an attribute?
And its opposite operator too.  Maybe ^MAIL:to and ~MAIL:to if you want
prefix operators caret (attribute exists) and tilde (attribute missing).

Of course it would be possible; MAIL:to=* already tests for the presence of the attribute, just the opposite operator is missing.

However, it would be the same as querying for a non-indexed attribute: expensive. BFS actually can do that, I just disabled it, because most apps don't care if an index exists, and just query for stuff, which slowed down things considerably.

With the "does not exist" operator, it would be different, as you'd know in advance that the query will be slow :-)
For the non-indexed attributes, I originally planned an extra flag that enables them, but never got around to do that.

P.S. Is the query syntax documented anywhere?  Still wonder if = or ==
is the preferred syntax for equality tests.

If both work, you can have your own preference :-)
I don't remember where it has been documented, but I'm sure in a number of places.


Bye,
   Axel.

Other related posts: