Package com.gengoai.sql.operator
Interface SQLOperable
-
- All Superinterfaces:
Serializable
,SQLElement
- All Known Subinterfaces:
CompositeSQLElement
,PreRenderedSQL
- All Known Implementing Classes:
Between
,Column
,InfixBinaryOperator
,PostfixUnaryOperator
,PrefixUnaryOperator
,QueryOperator
,SQLFunction
,SQLOperator
,Table
public interface SQLOperable extends SQLElement
Interface defining anSQLElement
that is can be an argument to anSQLOperator
.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default SQLOperable
add(@NonNull SQLElement rhs)
Adds this element with the given element.default SQLOperable
add(@NonNull Number rhs)
Adds this element with the given number.default SQLOperable
and(@NonNull SQLElement rhs)
Ands this element with given element.default SQLOperable
as(@NonNull String name)
Defines an alias over a column, table, or subquery.default SQLOperable
asc()
Informs the query that this element is to be sorted in ascending order.default SQLOperable
between(@NonNull SQLElement lower, @NonNull SQLElement upper)
Creates a BETWEEN operator with this element representing the column namedefault SQLOperable
between(@NonNull Number lower, @NonNull Number upper)
Creates a BETWEEN operator with this element representing the column namedefault SQLOperable
concat(@NonNull SQLElement rhs)
Concatenates this element with the given elementdefault SQLOperable
desc()
Informs the query that this element is to be sorted in descending order.default SQLOperable
div(@NonNull SQLElement rhs)
Divides this element by the given element.default SQLOperable
div(@NonNull Number rhs)
Divides this element by the given element.default SQLOperable
eq(@NonNull SQLElement rhs)
Creates an equality check between this element and the given elementdefault SQLOperable
eq(@NonNull Number rhs)
Creates an equality check between this element and the given elementdefault SQLOperable
fullTextMatch(@NonNull String string)
Creates a full text search operator using this element as the columndefault SQLOperable
gt(@NonNull SQLElement rhs)
Creates a greater than equality check between this element and the given elementdefault SQLOperable
gt(@NonNull Number rhs)
Creates a greater than equality check between this element and the given elementdefault SQLOperable
gte(@NonNull SQLElement rhs)
Creates a greater than equal to equality check between this element and the given elementdefault SQLOperable
gte(@NonNull Number rhs)
Creates a greater than equal to equality check between this element and the given elementdefault SQLOperable
in(@NonNull SQLElement element)
Creates an IN operator treating this element as the item being checked and the given element as the list of items being checked in.default SQLOperable
isNotNull()
Creates an is not null check for this elementdefault SQLOperable
isNull()
Creates a null check for this elementdefault SQLOperable
like(@NonNull SQLElement rhs)
Creates a LIKE operator with this element as the column or expression being checked .default SQLOperable
lt(@NonNull SQLElement rhs)
Creates a less than equality check between this element and the given elementdefault SQLOperable
lt(@NonNull Number rhs)
Creates a less than equality check between this element and the given elementdefault SQLOperable
lte(@NonNull SQLElement rhs)
Creates a less than or equal to equality check between this element and the given elementdefault SQLOperable
lte(@NonNull Number rhs)
Creates a less than or equal to equality check between this element and the given elementdefault SQLOperable
mod(@NonNull SQLElement rhs)
Creates anSQLOperable
that is the result of taking moderhs
of this number.default SQLOperable
mod(@NonNull Number rhs)
Creates anSQLOperable
that is the result of taking moderhs
of this number.default SQLOperable
mul(@NonNull SQLElement rhs)
Multiplies this element with the given element.default SQLOperable
mul(@NonNull Number rhs)
Multiplies this element with the given element.default SQLOperable
neq(@NonNull SQLElement rhs)
Creates an inequality check between this element and the given elementdefault SQLOperable
neq(@NonNull Number rhs)
Creates an inequality check between this element and the given elementdefault SQLOperable
not()
Negates this expressiondefault SQLOperable
or(@NonNull SQLElement rhs)
ORs this element with given element.default SQLOperable
pow(@NonNull SQLElement rhs)
Creates anSQLOperable
that is the result of raising this number to the power ofrhs
.default SQLOperable
pow(@NonNull Number rhs)
Creates anSQLOperable
that is the result of raising this number to the power ofrhs
.default SQLOperable
regexp(@NonNull String regex)
Checks if this element matches the given regular expressiondefault SQLOperable
sub(@NonNull SQLElement rhs)
Subtracts the given element from this element with.default SQLOperable
sub(@NonNull Number rhs)
Subtracts the given element from this element with.-
Methods inherited from interface com.gengoai.sql.SQLElement
getClassName
-
-
-
-
Method Detail
-
add
default SQLOperable add(@NonNull @NonNull SQLElement rhs)
Adds this element with the given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
add
default SQLOperable add(@NonNull @NonNull Number rhs)
Adds this element with the given number.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
and
default SQLOperable and(@NonNull @NonNull SQLElement rhs)
Ands this element with given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
as
default SQLOperable as(@NonNull @NonNull String name)
Defines an alias over a column, table, or subquery.- Parameters:
name
- the name of the alias- Returns:
- the SQLElement
-
asc
default SQLOperable asc()
Informs the query that this element is to be sorted in ascending order.- Returns:
- the SQLOperable
-
between
default SQLOperable between(@NonNull @NonNull SQLElement lower, @NonNull @NonNull SQLElement upper)
Creates a BETWEEN operator with this element representing the column name- Parameters:
lower
- the lower range of the betweenupper
- the upper range of the between- Returns:
- the SQLOperable
-
between
default SQLOperable between(@NonNull @NonNull Number lower, @NonNull @NonNull Number upper)
Creates a BETWEEN operator with this element representing the column name- Parameters:
lower
- the lower range of the betweenupper
- the upper range of the between- Returns:
- the SQLOperable
-
concat
default SQLOperable concat(@NonNull @NonNull SQLElement rhs)
Concatenates this element with the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
desc
default SQLOperable desc()
Informs the query that this element is to be sorted in descending order.- Returns:
- the SQLOperable
-
div
default SQLOperable div(@NonNull @NonNull SQLElement rhs)
Divides this element by the given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
div
default SQLOperable div(@NonNull @NonNull Number rhs)
Divides this element by the given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
eq
default SQLOperable eq(@NonNull @NonNull SQLElement rhs)
Creates an equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
eq
default SQLOperable eq(@NonNull @NonNull Number rhs)
Creates an equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
fullTextMatch
default SQLOperable fullTextMatch(@NonNull @NonNull String string)
Creates a full text search operator using this element as the column- Parameters:
string
- the string to search for- Returns:
- the SQLOperable
-
gt
default SQLOperable gt(@NonNull @NonNull SQLElement rhs)
Creates a greater than equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
gt
default SQLOperable gt(@NonNull @NonNull Number rhs)
Creates a greater than equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
gte
default SQLOperable gte(@NonNull @NonNull SQLElement rhs)
Creates a greater than equal to equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
gte
default SQLOperable gte(@NonNull @NonNull Number rhs)
Creates a greater than equal to equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
in
default SQLOperable in(@NonNull @NonNull SQLElement element)
Creates an IN operator treating this element as the item being checked and the given element as the list of items being checked in.- Parameters:
element
- the element representing the items we are checking for existence in- Returns:
- the SQLOperable
-
isNotNull
default SQLOperable isNotNull()
Creates an is not null check for this element- Returns:
- the SQLOperable
-
isNull
default SQLOperable isNull()
Creates a null check for this element- Returns:
- the SQLOperable
-
like
default SQLOperable like(@NonNull @NonNull SQLElement rhs)
Creates a LIKE operator with this element as the column or expression being checked .- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
lt
default SQLOperable lt(@NonNull @NonNull SQLElement rhs)
Creates a less than equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
lt
default SQLOperable lt(@NonNull @NonNull Number rhs)
Creates a less than equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
lte
default SQLOperable lte(@NonNull @NonNull SQLElement rhs)
Creates a less than or equal to equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
lte
default SQLOperable lte(@NonNull @NonNull Number rhs)
Creates a less than or equal to equality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
mod
default SQLOperable mod(@NonNull @NonNull Number rhs)
Creates anSQLOperable
that is the result of taking moderhs
of this number.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
mod
default SQLOperable mod(@NonNull @NonNull SQLElement rhs)
Creates anSQLOperable
that is the result of taking moderhs
of this number.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
mul
default SQLOperable mul(@NonNull @NonNull SQLElement rhs)
Multiplies this element with the given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
mul
default SQLOperable mul(@NonNull @NonNull Number rhs)
Multiplies this element with the given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
neq
default SQLOperable neq(@NonNull @NonNull SQLElement rhs)
Creates an inequality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
neq
default SQLOperable neq(@NonNull @NonNull Number rhs)
Creates an inequality check between this element and the given element- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
not
default SQLOperable not()
Negates this expression- Returns:
- the SQLOperable
-
or
default SQLOperable or(@NonNull @NonNull SQLElement rhs)
ORs this element with given element.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
pow
default SQLOperable pow(@NonNull @NonNull Number rhs)
Creates anSQLOperable
that is the result of raising this number to the power ofrhs
.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
pow
default SQLOperable pow(@NonNull @NonNull SQLElement rhs)
Creates anSQLOperable
that is the result of raising this number to the power ofrhs
.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
regexp
default SQLOperable regexp(@NonNull @NonNull String regex)
Checks if this element matches the given regular expression- Parameters:
regex
- the regex- Returns:
- the SQLOperable
-
sub
default SQLOperable sub(@NonNull @NonNull SQLElement rhs)
Subtracts the given element from this element with.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
sub
default SQLOperable sub(@NonNull @NonNull Number rhs)
Subtracts the given element from this element with.- Parameters:
rhs
- the right hand side of the binary operator- Returns:
- the SQLOperable
-
-