[openbeos] Re: queries on missing attributes

  • From: "Alexander G. M. Smith" <agmsmith@xxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 20 Dec 2004 22:49:28 -0500 EST

Jonas Sundström wrote on Mon, 20 Dec 2004 14:23:50 +0100 CET:
> Is there a way to make queries on missing attributes?

Since it needs an index to iterate over, you can use the file type to just
check the files you need, or even "name=*" to iterate over all files.  The
query would be something like name=*&&attribute="", but that only works for
strings I think.  Or maybe you could try name=*&&attribute!=*

I added a couple of operators in my RAM file system for testing attribute
existance, <>attribute for files including that attribute, and ><attribute
for ones that don't have it (think of the > and < together making an X shape
to cross out the possibility of existance).  But since the query language
is implemented by each file system (some wasted effort there - the OS should
just provide indices, let library code do queries), those operators are only
in AGMSRAMFileSystem.

- Alex

Other related posts: