Class: Expr

.xsds. Expr

new Expr()

Methods

<static> $and()

constructs an expression to be used in $where, $addFields, or $order representing that all boolean expression arguments should hold
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$lt(10).$and(soHeader.DELIVERYSTATUS.$eq("I")))

<static> $avg()

constructs an expression to be used in $where, $addFields, or $order representing the average function application on an expression
Example
var averageQuantity = soItem.$query().$aggregate({
    SALESORDERID: true,
    PRODUCTID: true
}).$addFields({
    averageQuantity: soItem.QUANTITY.$avg()
})

<static> $count()

constructs an expression to be used in $where, $addFields, or $order representing the count function application between two expressions
Example
var ctOfProdIts = = soItem.$query().$aggregate({
    PRODUCTID: true
}).$addFields({
    countOfProdIDs: soItem.PRODUCTID.$count()
})

<static> $div()

constructs an expression to be used in $where, $addFields, or $order representing the division of two expressions
Example
soHeader.$query().$addFields({"dividedBy10": soHeader.NETAMOUNT.$div(10)})

<static> $eq()

constructs an expression to be used in $where, $addFields, or $order representing the equality of two expressions
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$eq(0))

<static> $ge()

constructs an expression to be used in $where, $addFields, or $order representing the greater-than-or-equal relation between two expressions
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$ge(10))

<static> $gt()

constructs an expression to be used in $where, $addFields, or $order representing the greater-than relation between two expressions
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$gt(10))

<static> $infixOp()

constructs an expression to be used in $where, $addFields, or $order representing an infix operation specified as first argument
Example
soHeader.$query().$where(soHeader.CURRENCY.$infixOp("LIKE", "%UR"))// generated: ...WHERE "t0"."CURRENCY" LIKE '%UR'",

<static> $le()

constructs an expression to be used in $where, $addFields, or $order representing the less-than-or-equal relation between two expressions
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$le(10))

<static> $like()

constructs an expression to be used in $where, $addFields, or $order representing that the first expression argument is LIKE the second expression argument
Example
soHeader.$query().$where(soHeader.CURRENCY.$like("%UR"))

<static> $lt()

constructs an expression to be used in $where, $addFields, or $order representing the less-than relation between two expressions
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$lt(10))

<static> $max()

constructs an expression to be used in $where, $addFields, or $order representing the maximum function application on an expression
Example
var maximalQuantity = soItem.$query().$aggregate({
    SALESORDERID: true,
    PRODUCTID: true
}).$addFields({
    maximalQuantity: soItem.QUANTITY.$max()
})

<static> $min()

constructs an expression to be used in $where, $addFields, or $order representing the minimum function application on an expression
Example
var minimalQuantity = soItem.$query().$aggregate({
    SALESORDERID: true,
    PRODUCTID: true
}).$addFields({
    minimalQuantity: soItem.QUANTITY.$min()
})

<static> $minus()

constructs an expression to be used in $where, $addFields, or $order representing the subtraction of two expressions
Example
soHeader.$query().$addFields({"minus10": soHeader.NETAMOUNT.$minus(10)})

<static> $ne()

constructs an expression to be used in $where, $addFields, or $order representing the not-equal relation between two expressions
Example
soHeader.$query().$where(soHeader.DELIVERYSTATUS.$ne("I"))

<static> $not()

constructs an expression to be used in $where, $addFields, or $order representing that the given boolean expression should not hold
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$lt(10).$and(soHeader.DELIVERYSTATUS.$eq("I").$not()))
// generates ... WHERE ("t0"."NETAMOUNT"<10) AND ( NOT "t0"."DELIVERYSTATUS"='I')

<static> $null()

constructs an expression to be used in $where, $addFields, or $order representing that an expression is equal to null. If an additional argument "false" is given the expression states that the first expression is not null.
Examples
soHeader.$query().$where(soHeader.BILLINGSTATUS.$null()) // generates: ... WHERE "t0"."BILLINGSTATUS" IS NULL
soHeader.$query().$where(soHeader.BILLINGSTATUS.$null(false)) // generates: ... WHERE "t0"."BILLINGSTATUS" IS NOT NULL

<static> $or()

constructs an expression to be used in $where, $addFields, or $order representing that one of boolean expression arguments should hold
Example
soHeader.$query().$where(soHeader.NETAMOUNT.$lt(10).$or(soHeader.DELIVERYSTATUS.$eq("I")))

<static> $plus()

constructs an expression to be used in $where, $addFields, or $order representing the addition of two expressions
Example
soHeader.$query().$addFields({"added10": soHeader.NETAMOUNT.$plus(10)})

<static> $prefixOp()

constructs an expression to be used in $where, $addFields, or $order representing a prefix operation specified as first argument
Example
soHeader.$query().$addFields({
    "DaysAgo": soHeader.items.DELIVERYDATE.$prefixOp("DAYS_BETWEEN", new Date())
})

<static> $sum()

constructs an expression to be used in $where, $addFields, or $order representing the sum function application between two expressions
Example
var sumOfNetAmounts = soItem.$query().$aggregate({
    SALESORDERID: true,
    PRODUCTID: true
}).$addFields({
    sumOfNetAmounts: soItem.NETAMOUNT.$sum()
})

<static> $times()

constructs an expression to be used in $where, $addFields, or $order representing the multiplication of two expressions
Example
soHeader.$query().$addFields({"times10": soHeader.NETAMOUNT.$times(10)})

<static> $unlike()

constructs an expression to be used in $where, $addFields, or $order representing that the first expression argument is NOT LIKE the second expression argument
Example
soHeader.$query().$where(soHeader.CURRENCY.$unlike("%UR"))