Copyright ©1995 by NeXT Computer, Inc.  All Rights Reserved.




Query Language Symbols and Operators



Literals

self Refers to the object the expression is being evaluated for
yes or true Boolean values for TRUE
no or false Boolean values for FALSE
"aString" or 'aString' Declares aString a string literal
number Any legal integer or floating point number
AttributeName An attribute reference


Transform Operators

quote(some text) Results in a string value equal to some text
regex(a BSD regular expression) Results in a regular expression
shell(an expression with shell wildcards) Results in a regular expression
parse(some text) Parses the text argument into an attribute-value list


Projection Operators

project(AttributeName entity_or_object) Projects the attribute named AttributeName from the set of attributes represented by entity_or_object


Boolean Operators

or(a b) Results in true if either a or b is true, false if both are false
and(a b) Results in true if both a and b are true, false if either is false
not(a b) Equivalent to and(a not(b))
not(a) The logical negation of a


Set Operators

or(s t) Results in the union of sets s and t
or(s) "Any one or more of the items in set s" (for use with search operators only)
and(s t) Results in the intersection of sets s and t
and(s) "All of the items in set s" (for use with search operators only)
not(s t) Results in a set containing those items in set s that aren't in set t


Relational Operators

gt(a b) Results in true if a is greater than b, false otherwise
ge(a b) Results in true if a is greater than or equal to b, false otherwise
eq(a b) Results in true if a is equal to b, false otherwise
ne(a b) Results in true if a is not equal to b, false otherwise
lt(a b) Results in true if a is less than b, false otherwise
le(a b) Results in true if a is less than or equal b, false otherwise


Arithmetic Operators

add(a b) Results in the sum of a and b
sub(a b) Results in difference of a and b
mul(a b) Results in product of a and b
div(a b) Results in quotient of a and b
neg(a) Results in the arithmetic negative of a


Search Operators

whole(value) Searches for value as an exact match in the Default attribute
whole(AttributeName value) Searches for value as an exact match in the attribute named AttributeName
whole(entity value) Searches for value as an exact match in entity; results in true if value is found, false if not
whole(string value) Searches for value as an exact match to string; results in true if value is found, false if not (this is equivalent to eq(string value))
prefix() Searches for a value as a prefix match; arguments may be as for whole()
within() Searches for a value as a match anywhere within an attribute or string; arguments may be as for whole()


Pre-defined Attributes

Default The default attribute defined by the query language
Content For a file or file record, the literal text of the file


IXFileRecord Attributes

FileName The name of a file relative to the root path of the
IXFileFinder that created the IXFileRecord (string).
FileType The file's type (string); for example, "rtf".
FileDevice The device number for the device the file is on, as returned by stat() (number).
FileInode The inode number of the file (number).
FileMode The file's permissions (number).
FileCount The number of hard links to the file (number).
FileOwner The file's owner (string).
FileGroup The file's group (string).
FileSize The file's size, in bytes (number).
AccessTime The time the file was last accessed, as returned by stat() (number).
ModifyTime The time the file's content was last modified, as returned by stat() (number).
ChangeTime The time the file's status information was last changed, as returned by stat() (number).
UnixType The inode type for the file, encoded as a number.