General Information | |
Operators | == |
!= | |
Type | binary |
Syntaxes | expr == expr |
expr != expr | |
Commutative | yes |
Operand Types | any type |
Result Type | boolean |
Functions | equal |
not equal |
Expression Examples | |
expression | result |
1 == 1 | true |
1 == 1.0 | true |
1 != 2 | true |
1 == 2 | false |
1 == "hello" | false |
"hello" == "hello" | true |
list(1, 2, 3) == list(1, 2, 3) | true |
set(1, 3, 2) == set(1, 2, 3) | true |
General Information | |
Operators | < |
<= | |
> | |
>= | |
Type | binary |
Syntaxes | expr < expr |
expr <= expr | |
expr > expr | |
expr >= expr | |
Commutative | no |
Operand Types | integer, float, char, string, list, array, set, bag |
Result Type | boolean |
Functions | the function depends on the operands: |
< : less than or is included in | |
<= : less than or equal or is included in or equal | |
> : greater than or contains | |
>= : greater than or equal or contains or equal |
Possible Operand Combinations | |||
first operand type | second operand type | result type | comments |
integer, char, float | integer, char, float | boolean | performs an arithmetic comparison |
string | string | boolean | performs an alpha-numeric comparison |
set | set | boolean | performs an inclusion comparison |
bag | bag | boolean | performs an inclusion comparison |
set | bag | boolean | performs an inclusion comparison: the set operand is converted to a bag |
bag | set | boolean | performs an inclusion comparison: the set operand is converted to a bag |
list | list | boolean | performs a term-to-term polymorphic (i.e. numeric, alpha-numeric or inclusion) comparison |
array | array | boolean | performs a term-to-term polymorphic comparison |
Expression Examples | |
expression | result |
1 < 2 | true |
1 >= 2 | false |
2. <= 2 | true |
"hello" < "world" | true |
"hello" >= "world" | false |
list(1, 2) < list(2, 3) | true |
list(1, 2) < list(0, 3) | false |
list(1, 2) < list(0, 3, 2) | false |
list(0, 3, 2) >= list(1, 2) | false |
list(1, 2) < list(2, 3, 3) | true |
list(1, 2) < list(0) | false |
set(1, 2) < set(2, 4, 44) | false |
set(1, 2) < set(2, 1, 44) | true |
"hello" >= 3 | raises an error |
list(1, 2) < array(2, 4, 44) | raises an error |
set(1, 2) < bag(2, 1, 44) | raises an error |
like : ODMG OQL operator. Returns true if the firstoperand matches the regular expression.Note that the operator like uses currently the UNIX form of regular expressions instead of the SQL form. It will become ODMG/SQL compliant in a next version.
Otherwise false is returned. The regular expression is am SQL regular expression where,
for instance, % and _ are wilcard characters.
~ : This operator hasthe same functionnality as the like operator but theregular expression
has the UNIX syntax.
: Returns true if the firstoperand matches the regular expression in a case insensitive way.
Otherwise false is returned.
!~ : Returns true if the firstoperand does not match the regular expression.
Otherwise false is returned.
!~~ : Returns true if the firstoperand does not match the regular expression in a case insensitive
way. Otherwise false is returned.
General Information | |||||||||||
Operators | ~ | ||||||||||
~~ | |||||||||||
!~ | |||||||||||
!~~ | |||||||||||
like | |||||||||||
Type | binary | ||||||||||
Syntaxes | expr ~ expr | ||||||||||
expr ~~ expr | |||||||||||
expr !~ expr | |||||||||||
expr !~~ expr | |||||||||||
expr like expr | |||||||||||
Commutative | no | ||||||||||
Operand Types | string | ||||||||||
Result Type | boolean | ||||||||||
Functions |
|
Expression Examples | |
expression | result |
"hello" ~ "LL" | false |
"hello" ~~ "LL" | true |
"hello" ~ "^LL" | false |
"hello" ~ "^h" | true |
"hello" !~ "^h" | false |
"hello" ~ ".*ll.*" | true |
".*ll.*" ~ "hello" | false because regular expression should be on the right |
EyeDB manual