2.2.3.6.1.1.5 Lifted Operators

A data service MAY support the allowance of operators that operate on Entity Data Model (EDM) primitive types to also be used with nullable forms of those types for the following operations.

Type

Operation

Common Expression

unary

negate

not

negateExpression

notExpression

binary

add

sub

mul

div

mod

addExpression

subExpression

mulExpression

divExpression

modExpression

relational

gt

ge

lt

le

gtExpression

geExpression

ltExpression

leExpression

equality

eq

ne

eqExpression

neExpression

logical

and

or

andExpression

orExpression

member

/

memberExpression

boolPrimitiveMemberExpression

Table: Lifted operators

  • If supported, for unary operators, a data service MUST return the value null if the operand value is null.

  • If supported, for binary operators, a data service MUST return the value null if either operand value is null.

  • If supported, for relational operators, a data service MUST return the value false if one or both of the operands is null.

  • If supported, for equality operators, a data service MUST consider two null values equal and a null value unequal to any non-null value.

  • If supported, for logical operators, a data service MUST return the true or false, even if one or more operand values are null. For the purposes of comparison semantics, any null operand to a logical operation SHOULD be treated as false.<50>

  • If supported, for member operators, a data service MUST return null if any of the NavigationProperties are null.

  • If supported, for Boolean expressions evaluated to the value of null, a data service MUST return the value of false.