EldoS
 Table of Contents >  Operators of SolFS query language
Navigation
Web site
Support
Table Of Contents

Functions and Operators of SolFS query language

See also    

Overview

Mathematical operators in SolFS query language are represented by addition, subtraction, multiplication and division. Usual relational operators (=, >, <, >=, <=) are supported. There are three logical operations: NOT, AND, OR. A particular operator D was introduced for explicit conversion of String to DateTime.

Supported operators:

Operator Operand type(s) Description
Logical Operators
not, ~, ! Boolean Logical negation (NOT)
Number Bitwise NOT
and, & Boolean Logical AND
Number Bitwise AND
or, | Boolean Logical OR
Number Bitwise OR
Mathematical Operators
+ Number, DateTime Addition. If you add a Number to DateTime, the result will be of type DateTime with number of days, increased by the value of Number operand.
String String concatenation.
- Number Negation
Number, DateTime Subtraction. If you subtract a Number from DateTime, the result will be of type DateTime with number of days, decreased by the subtrahend.
Subtraction of a DateTime from DateTime results in a Number which contains difference in days. In this case time is not taken into account.
* Number Multiplication
/ Number Division. Division by zero rises exception.
Relational Operators
=, == All types Equal to
<>, != All types Not equal to
> All types Greater than
< All types Less than
>= All types Greater than or equal to
<= All types Less than or equal to
Conditions
IS[ NOT] NULL All types IS returns True if the value is NULL, and False otherwise. IS NOT acts in the opposite way.
IS[ NOT] TRUE Boolean IS returns True if the value is True, and False otherwise. IS NOT acts in the opposite way.
IS[ NOT] FALSE Boolean IS returns True if the value is False, and False otherwise. IS NOT acts in the opposite way.
LIKE String This condition allows to incorporate wildcards into string tag search and perform pattern matching. LIKE supports two wildcards: % and _.
% allows to match any string of any length. Example: "From LIKE '% Smith'". This query selects all files received from all people with the second name Smith.
_ allows matching of a single character. Example: "From LIKE 'John Sm_th'". This query selects all files received from all Johns, which second name consists of five characters, begins with 'Sm' and ends with 'th' (Smith, Smyth, Smeth, etc).
Optional ESCAPE parameter can be used to search for values which include wildcard characters % or _. Example: "From LIKE 'John!_Smith' ESCAPE '!'". Here ! is defined as escape character, and the query will select all files received from John_Smith.
A more complicated example of using ESCAPE is the following: "From LIKE 'John!_%' ESCAPE '!'". In this example, all names beginning with John_ will match the query.
File functions
FileName String Returns the name of the current file
FullName String Returns the full name of the current file starting from the root directory "/"
Path String Returns full path to the current file including the final path separator
IsFile Boolean Returns True if the current file is NOT a directory, and False otherwise
IsDirectory Boolean Returns True if the current file is a directory, and False otherwise
IsLink Boolean Returns True if the current file is a link, and False otherwise
LinkDestination String If the current file is a link, returns its target. Otherwise, returns the full name of the file (i.e., the result is the same as if calling the FullName).
CreationTime DateTime Returns time and date when the current file has been created
LastAccessTime DateTime Returns the time and date when the current file has been accessed last time
ModificationTime DateTime Returns the time and date when the current file has been modified last time
Size Number Returns the size of the current file. For directories, returns 0 (zero).
Attributes Number Returns file attributes in the form of a number
IsEncrypted Boolean Returns True if the current file is encrypted, and False otherwise
IsCompressed Boolean Returns True if the current file is compressed, and False otherwise. May return True also for directories that contain files, compressed by default.
Intrinsic functions and constants
D(Value) String Converts String to DateTime. Conversion pattern is described in Type Conversion section.
IsNull(Value) All types Returns True if Value is NULL
IsNotNull(Value) All types Returns True if Value is not a NULL
Min(Value1, Value2) All types Returns the smallest of Value1 and Value2
Max(Value1, Value2) All types Returns the biggest of Value1 and Value2
Now DateTime Returns current system date and time
Today DateTime Returns current system date
True Boolean Boolean True
False Boolean Boolean False

See also

Type Conversion     Data Types    

Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2011, EldoS Corporation