Interface Expression
- All Known Subinterfaces:
SelectableExpression
PipelineStage
.
Expressions can be built:
- from a
DefaultQueryApi.Column
provided by aTables.Table
- or from
Exprs
(viaapi.queryApi().exprs()
) that gives access to Expressions building blocks
Selectable
object). To do so, the as(String)
method should be used.
For example here is an example of an single stage pipeline using some expressions:
def qapi = api.queryApi()
def p = qapi.tables().products()
qapi.source(
p,
[
p.sku(), // a Column object
qapi.exprs().string("foo").as("aStringLiteral"), // a literal expression built from Exprs
p.sku().concat("bar").as("skuBar") // expression built from the column
p.Cost().lessThan(5).as("veryInexpensive") // expression built from a column
],
// a more complex expression
qapi.exprs().and(
p.sku().like("%foo"),
p.Cost().lessThan(10)
) // no need to use `as()` here as only Expression object is expected (not Selectable)
).stream { it.each {
row -> // row is a map having the following keys: ["sku", "aStringLiteral", "skuBar", "veryInexpensive"]
}}
- Since:
- 14.0 - Caribou Lou
-
Method Summary
Modifier and TypeMethodDescriptionBuilds aSelectableExpression
having the same value as this expression and named after the given alias.Builds an expression that cast this expression to a boolean value.Builds an expression that cast this expression to a date only value.Builds an expression that cast this expression to a datetime value.Builds an expression that cast this expression to an integer value.Builds an expression that cast this expression to a real number value.Builds an expression that cast this expression to a string value.Builds an expression that concatenates this expression to a given value.concat
(Expression e) Builds an expression that concatenates this expression to a given value.Builds an expression that computes the value of this expression divided by the given value.div
(Expression e) Builds an expression that computes the value of this expression divided by the given value.Builds an expression evaluating if this expression is equal to the given boolean.Builds an expression evaluating if this expression is equal to the given number.Builds an expression evaluating if this expression is equal to the given String.Builds an expression evaluating if this expression is equal to the given date object.Builds an expression evaluating if this expression is equal to the given datetime object.equal
(Expression e) Builds an expression evaluating if this expression is equal to the given expression.equal
(DateTime datetime) Builds an expression evaluating if this expression is equal to the given datetime object.Builds an expression evaluating if this expression is equal to the given boolean.Builds an expression evaluating if this expression is equal to the given number.Builds an expression evaluating if this expression is equal to the given String.equalNullAware
(LocalDate dateWithoutTime) Builds an expression evaluating if this expression is equal to the given date object.equalNullAware
(Date datetime) Builds an expression evaluating if this expression is equal to the given datetime object.Builds an expression evaluating if this expression is equal to the given expression.equalNullAware
(DateTime datetime) Builds an expression evaluating if this expression is equal to the given datetime object.Builds an expression evaluating if this expression is greater than or equal to the given number.greaterOrEqual
(LocalDate dateWithoutTime) Builds an expression evaluating if this expression is greater than or equal to the given date object.greaterOrEqual
(Date datetime) Builds an expression evaluating if this expression is greater than or equal to the given datetime object.Builds an expression evaluating if this expression is greater than or equal to the given expression.greaterOrEqual
(DateTime datetime) Builds an expression evaluating if this expression is greater than or equal to the given datetime object.Builds an expression evaluating if this expression is strictly greater than the given number.greaterThan
(LocalDate dateWithoutTime) Builds an expression evaluating if this expression is strictly greater than the given date object.greaterThan
(Date datetime) Builds an expression evaluating if this expression is strictly greater than the given datetime object.Builds an expression evaluating if this expression is strictly greater than the given expression.greaterThan
(DateTime datetime) Builds an expression evaluating if this expression is strictly greater than the given datetime object.Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.ilike
(Expression e) Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.Builds an expression evaluating if this expression is equal to any of the element of the given list.isFalse()
Builds an expression evaluating if this expression is false.Builds an expression evaluating if this expression is not null.isNull()
Builds an expression evaluating if this expression is null.isTrue()
Builds an expression evaluating if this expression is true.length()
Builds an expression that computes the lenght of this expression as a String.Builds an expression evaluating if this expression is lower than or equal to the given number.lessOrEqual
(LocalDate dateWithoutTime) Builds an expression evaluating if this expression is lower than or equal to the given date object.lessOrEqual
(Date datetime) Builds an expression evaluating if this expression is lower than or equal to the given datetime object.Builds an expression evaluating if this expression is lower than or equal to the given expression.lessOrEqual
(DateTime datetime) Builds an expression evaluating if this expression is lower than or equal to the given datetime object.Builds an expression evaluating if this expression is strictly lower than the given number.Builds an expression evaluating if this expression is strictly lower than the given date object.Builds an expression evaluating if this expression is strictly lower than the given datetime object.Builds an expression evaluating if this expression is strictly lower than the given expression.lessThan
(DateTime datetime) Builds an expression evaluating if this expression is strictly lower than the given datetime object.Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.like
(Expression e) Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.Builds an expression that computes the first position (1-based index) of the given String in this expression.locate
(Expression needle) Builds an expression that computes the first position (1-based index) of the given String in this expression.lower()
Builds an expression that computes a lower case version of this expression.Builds an expression that computes the value of this expression minus the given value.minus
(Expression e) Builds an expression that computes the value of this expression minus the given value.Builds an expression that computes the value of the remainder of the Euclidean division of this expression by the given value.mod
(Expression e) Builds an expression that computes the value of the remainder of the Euclidean division of this expression by the given value.Builds an expression that computes the value of this expression multiplied by the given value.Builds an expression that computes the value of this expression multiplied by the given value.Builds an expression evaluating if this expression is not equal to the given boolean.Builds an expression evaluating if this expression is not equal to the given number.Builds an expression evaluating if this expression is not equal to the given String.Builds an expression evaluating if this expression is not equal to the given date object.Builds an expression evaluating if this expression is not equal to the given datetime object.Builds an expression evaluating if this expression is not equal to the given expression.notEqual
(DateTime datetime) Builds an expression evaluating if this expression is not equal to the given datetime object.Builds an expression evaluating if this expression is not equal to the given boolean.Builds an expression evaluating if this expression is not equal to the given number.Builds an expression evaluating if this expression is not equal to the given String.notEqualNullAware
(LocalDate dateWithoutTime) Builds an expression evaluating if this expression is not equal to the given date object.notEqualNullAware
(Date datetime) Builds an expression evaluating if this expression is not equal to the given datetime object.Builds an expression evaluating if this expression is not equal to the given expression.notEqualNullAware
(DateTime datetime) Builds an expression evaluating if this expression is not equal to the given datetime object.Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.Builds an expression evaluating if this expression not equal to all the element of the given list.Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.Builds an expression that computes the value of this expression plus the given value.plus
(Expression e) Builds an expression that computes the value of this expression plus the given value.substring
(int fromIndex, int length) Builds an expression that computes a substring of this expression value.substring
(Expression fromIndex, Expression length) Builds an expression that computes a substring of this expression value.trim()
Builds an expression that computes this expression without any starting or ending white space characters.upper()
Builds an expression that computes an upper case version of this expression.
-
Method Details
-
as
Builds aSelectableExpression
having the same value as this expression and named after the given alias.- Parameters:
alias
- the name of the selectable expression to return- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessThan
Builds an expression evaluating if this expression is strictly lower than the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- an expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessThan
Builds an expression evaluating if this expression is strictly lower than the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessThan
Builds an expression evaluating if this expression is strictly lower than the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessThan
Builds an expression evaluating if this expression is strictly lower than the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessThan
Builds an expression evaluating if this expression is strictly lower than the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the Number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessOrEqual
Builds an expression evaluating if this expression is lower than or equal to the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- an expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessOrEqual
Builds an expression evaluating if this expression is lower than or equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessOrEqual
Builds an expression evaluating if this expression is lower than or equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessOrEqual
Builds an expression evaluating if this expression is lower than or equal to the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
lessOrEqual
Builds an expression evaluating if this expression is lower than or equal to the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the Number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterThan
Builds an expression evaluating if this expression is strictly greater than the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- an expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterThan
Builds an expression evaluating if this expression is strictly greater than the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterThan
Builds an expression evaluating if this expression is strictly greater than the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterThan
Builds an expression evaluating if this expression is strictly greater than the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterThan
Builds an expression evaluating if this expression is strictly greater than the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the Number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterOrEqual
Builds an expression evaluating if this expression is greater than or equal to the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- an expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterOrEqual
Builds an expression evaluating if this expression is greater than or equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterOrEqual
Builds an expression evaluating if this expression is greater than or equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterOrEqual
Builds an expression evaluating if this expression is greater than or equal to the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- Date object to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
greaterOrEqual
Builds an expression evaluating if this expression is greater than or equal to the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the Number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given String.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the String to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- the date to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equal
Builds an expression evaluating if this expression is equal to the given boolean.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the boolean to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given expression.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
e
- the expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given String.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
e
- the String to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given datetime object.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given datetime object.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given date object.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
dateWithoutTime
- the date to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given number.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
e
- the number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
equalNullAware
Builds an expression evaluating if this expression is equal to the given boolean.This null aware version will return
- true if this expression and the given value are both null
- false if only one of this expression or the given value is null
- otherwise it will return the result of the normal equality
- Parameters:
e
- the boolean to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given expression.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given String.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the String to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given datetime object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given date object.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
dateWithoutTime
- the date to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given number.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqual
Builds an expression evaluating if this expression is not equal to the given boolean.If this expression or the given value is null then this expression will evaluate to null
- Parameters:
e
- the boolean to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given expression.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
e
- the expression to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given String.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
e
- the String to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given datetime object.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given datetime object.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
datetime
- the datetime to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given date object.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
dateWithoutTime
- the date to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given number.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
e
- the number to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
notEqualNullAware
Builds an expression evaluating if this expression is not equal to the given boolean.This null aware version will return
- false if this expression and the given value are both null
- true if only one of this expression or the given value is null
- otherwise it will return the result of the normal non equality
- Parameters:
e
- the boolean to be compared with this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
like
Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.This operator is case-sensitive.
Specification of the pattern can be find on w3shcools website or on the PosgreSQL official documentation.
As an example
qapi.tables().products().sku().like("%foo%")
will be true for any sku containing the "foo" string.- Parameters:
e
- an expression providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
like
Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.This operator is case-sensitive.
Specification of the pattern can be find on w3shcools website or on the PosgreSQL official documentation.
As an example
qapi.tables().products().sku().like("%foo%")
will be true for any sku containing the "foo" string.- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
ilike
Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.This operator is case-insensitive.
Specification of the pattern can be find on w3shcools website or on the PosgreSQL official documentation.
As an example
qapi.tables().products().sku().like("%foo%")
will be true for any sku containing the "foo" string with any combination of upper or lower case characters.- Parameters:
e
- an expression providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
ilike
Builds an expression evaluating if this expression is matching the standard SQLLIKE
pattern provided by the given value.This operator is case-insensitive.
Specification of the pattern can be find on w3shcools website or on the PosgreSQL official documentation.
As an example
qapi.tables().products().sku().like("%foo%")
will be true for any sku containing the "foo" string with any combination of upper or lower case characters.- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
notLike
Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.This operator is case-sensitive.
- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
notLike
Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.This operator is case-sensitive.
- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
notIlike
Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.This operator is case-insensitive.
- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
notIlike
Builds an expression evaluating if this expression is not matching the standard SQLLIKE
pattern provided by the given value.This operator is case-insensitive.
- Parameters:
e
- a string providing given standard SQLLIKE
pattern- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
in
Builds an expression evaluating if this expression is equal to any of the element of the given list.Works only with homogenous lists containing elements of the following types: String, Number, Boolean (note that it does not work with Date, org.joda.time.DateTime, java.time.LocalDate)
- Parameters:
e
- the list of value to be compared to this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
notIn
Builds an expression evaluating if this expression not equal to all the element of the given list.Works only with homogenous lists containing elements of the following types: String, Number, Boolean (note that it does not work with Date, org.joda.time.DateTime, java.time.LocalDate)
- Parameters:
e
- the list of value to be compared to this expression- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
isNull
Expression isNull()Builds an expression evaluating if this expression is null.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
isNotNull
Expression isNotNull()Builds an expression evaluating if this expression is not null.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
isTrue
Expression isTrue()Builds an expression evaluating if this expression is true.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
isFalse
Expression isFalse()Builds an expression evaluating if this expression is false.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
castAsString
Expression castAsString()Builds an expression that cast this expression to a string value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
castAsReal
Expression castAsReal()Builds an expression that cast this expression to a real number value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
castAsInteger
Expression castAsInteger()Builds an expression that cast this expression to an integer value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
castAsBoolean
Expression castAsBoolean()Builds an expression that cast this expression to a boolean value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
castAsDateOnly
Expression castAsDateOnly()Builds an expression that cast this expression to a date only value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
castAsDateTime
Expression castAsDateTime()Builds an expression that cast this expression to a datetime value.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
concat
Builds an expression that concatenates this expression to a given value.- Parameters:
e
- the expression to be concatenated- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
concat
Builds an expression that concatenates this expression to a given value.- Parameters:
e
- the String to be concatenated- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
-
substring
Builds an expression that computes a substring of this expression value.fromIndex
should be a 1-based index as a result:qapi.exprs().string("fooBar").subString(1, 4) // evaluates to "fooB" qapi.exprs().string("fooBar").subString(4, 10) // evaluates to "Bar"
- Parameters:
fromIndex
- the 1-based index start of the substring to extractlength
- the max length of the substring to extract- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
substring
Builds an expression that computes a substring of this expression value.fromIndex
should be a 1-based index as a result:qapi.exprs().string("fooBar").subString(1, 4) // evaluates to "fooB" qapi.exprs().string("fooBar").subString(4, 10) // evaluates to "Bar"
- Parameters:
fromIndex
- the 1-based index start of the substring to extractlength
- the max length of the substring to extract- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
upper
Expression upper()Builds an expression that computes an upper case version of this expression.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
lower
Expression lower()Builds an expression that computes a lower case version of this expression.- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
trim
Expression trim()Builds an expression that computes this expression without any starting or ending white space characters.qapi.exprs().string(" fooBar \t ").trim() // evaluates to "fooBar", removes trailing and starting tabs and spaces
- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
length
Expression length()Builds an expression that computes the lenght of this expression as a String.- Returns:
- the build expression
- Since:
- 14.0 - Caribou Lou
-
locate
Builds an expression that computes the first position (1-based index) of the given String in this expression.- Parameters:
needle
- the expression of the String to be searched- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
locate
Builds an expression that computes the first position (1-based index) of the given String in this expression.- Parameters:
needle
- the String to be searched- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
plus
Builds an expression that computes the value of this expression plus the given value.- Parameters:
e
- the expression to be added- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
plus
Builds an expression that computes the value of this expression plus the given value.- Parameters:
e
- the Number to be added- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
minus
Builds an expression that computes the value of this expression minus the given value.- Parameters:
e
- the expression to be subtracted- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
minus
Builds an expression that computes the value of this expression minus the given value.- Parameters:
e
- the Number to be subtracted- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
multiply
Builds an expression that computes the value of this expression multiplied by the given value.- Parameters:
e
- the factor to be multiplied with- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
multiply
Builds an expression that computes the value of this expression multiplied by the given value.- Parameters:
e
- the factor to be multiplied with- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
div
Builds an expression that computes the value of this expression divided by the given value.- Parameters:
e
- the divisor- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
div
Builds an expression that computes the value of this expression divided by the given value.- Parameters:
e
- the divisor- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
mod
Builds an expression that computes the value of the remainder of the Euclidean division of this expression by the given value.- Parameters:
e
- the divisor- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-
mod
Builds an expression that computes the value of the remainder of the Euclidean division of this expression by the given value.- Parameters:
e
- the divisor- Returns:
- the built expression
- Since:
- 14.0 - Caribou Lou
- See Also:
-