NullExpression
The NullExpression is part of the Dynamic Where feature; it represents a NULL
value.
Implementation
- NullExpression (.NET)
- NullExpression (Java)
- TDANullExpression (Delphi)
- NullExpression (JavaScript)
Example
Target SQL where
clause:
WHERE client_address IS NULL
WhereExpression where = new BinaryExpression(
new FieldExpression("CLIENTS", "Client_Address"),
new NullExpression(),
BinaryOperator.Equal);
let whereExpression = BinaryExpression(
FieldExpression("CLIENTS", "Client_Address"),
NullExpression(),
BinaryOperator.Equal)
WhereExpression where = new BinaryExpression(
new FieldExpression("CLIENTS", "Client_Address"),
new NullExpression(),
BinaryOperator.Equal);
let whereExpression = BinaryExpression(
FieldExpression("CLIENTS", "Client_Address"),
NullExpression(),
BinaryOperator.Equal)
with ClientDataModule.tbl_CLIENTS,DynamicWhere do begin
Expression:=NewBinaryExpression(
NewField(LogicalName,'Client_Address'),
NewNull(),
dboEqual);
end;
myTable.dynamicWhere = new RemObjects.DataAbstract.DynamicWhere(
new RemObjects.DataAbstract.BinaryExpression(
new RemObjects.DataAbstract.FieldExpression("Client_Address"),
new RemObjects.DataAbstract.NullExpression(), "Equal")
));
Generated XML/JSON
<?xml version="1.0"?>
<query xmlns="http://www.remobjects.com/schemas/dataabstract/queries/5.0" version="5.0">
<where>
<binaryoperation operator="Equal">
<field tablename="CLIENTS">Client_Address</field>
<null/>
</binaryoperation>
</where>
</query>
{
"type": "query.where",
"expression": {
"type": "binaryoperation",
"left": {
"type": "field",
"field": "Client_Address",
"table": "CLIENTS"
},
"operator": "Equal",
"right": {
"type": "null"
}
}
}