Interface Expression

All Superinterfaces:
Projection, Sql
All Known Subinterfaces:
AggregateFunction, ColumnFunction, Constant, Function, SingleRowFunction, SystemFunction
All Known Implementing Classes:
Abs, Addition, Avg, Ceil, Column, ColumnRef, Concat, Count, CountAll, CurrentDate, CurrentTime, CurrentTimestamp, Division, ExpressionSubquery, Floor, GenericConstant, Length, Lower, Max, Min, Modulo, Multiplication, NullConstant, Round, Substring, Subtraction, Sum, ToChar, ToNumber, Upper

public interface Expression extends Projection
Defines an expression resulting in a scalar value or a table with rows and columns.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Expression
    dividedBy(Expression expression)
    Creates the expression of dividing this expression by another expression.
    default Expression
    Creates the expression of dividing this expression by a constant value.
    default Expression
    minus(Expression expression)
    Creates the expression of subtracting another expression from this expression.
    default Expression
    minus(Object value)
    Creates the expression of subtracting a constant value from this expression.
    default Expression
    mod(Expression expression)
    Creates the expression of calculating the remainder after dividing this expression by another expression.
    default Expression
    mod(Object value)
    Creates the expression of calculating the remainder after dividing this expression by a constant value.
    default Expression
    plus(Expression expression)
    Creates the expression of adding another expression to this expression.
    default Expression
    plus(Object value)
    Creates the expression of adding a constant value to this expression.
    default Expression
    times(Expression expression)
    Creates the expression of multiplying another expression with this expression.
    default Expression
    times(Object value)
    Creates the expression of multiplying a constant value with this expression.

    Methods inherited from interface io.github.torand.fastersql.projection.Projection

    alias, as

    Methods inherited from interface io.github.torand.fastersql.sql.Sql

    aliasRefs, columnRefs, params, sql
  • Method Details

    • plus

      default Expression plus(Object value)
      Creates the expression of adding a constant value to this expression.
      Parameters:
      value - the constant value.
      Returns:
      the addition expression.
    • plus

      default Expression plus(Expression expression)
      Creates the expression of adding another expression to this expression.
      Parameters:
      expression - the other expression.
      Returns:
      the addition expression.
    • minus

      default Expression minus(Object value)
      Creates the expression of subtracting a constant value from this expression.
      Parameters:
      value - the constant value.
      Returns:
      the subtraction expression.
    • minus

      default Expression minus(Expression expression)
      Creates the expression of subtracting another expression from this expression.
      Parameters:
      expression - the other expression.
      Returns:
      the subtraction expression.
    • times

      default Expression times(Object value)
      Creates the expression of multiplying a constant value with this expression.
      Parameters:
      value - the constant value.
      Returns:
      the multiplication expression.
    • times

      default Expression times(Expression expression)
      Creates the expression of multiplying another expression with this expression.
      Parameters:
      expression - the other expression.
      Returns:
      the multiplication expression.
    • dividedBy

      default Expression dividedBy(Object value)
      Creates the expression of dividing this expression by a constant value.
      Parameters:
      value - the constant value.
      Returns:
      the division expression.
    • dividedBy

      default Expression dividedBy(Expression expression)
      Creates the expression of dividing this expression by another expression.
      Parameters:
      expression - the other expression.
      Returns:
      the division expression.
    • mod

      default Expression mod(Object value)
      Creates the expression of calculating the remainder after dividing this expression by a constant value.
      Parameters:
      value - the constant value.
      Returns:
      the modulo expression.
    • mod

      default Expression mod(Expression expression)
      Creates the expression of calculating the remainder after dividing this expression by another expression.
      Parameters:
      expression - the other expression.
      Returns:
      the modulo expression.