Class SetOperation

java.lang.Object
io.github.torand.fastersql.setoperation.SetOperation
All Implemented Interfaces:
Sql

public class SetOperation extends Object implements Sql
Implements a set operation.
  • Constructor Details

    • SetOperation

      public SetOperation(SelectStatement operand, SetOperator operator)
      Creates a set operation clause.
      Parameters:
      operand - the SELECT statement operand.
      operator - the set operator applied.
  • Method Details

    • all

      public SetOperation all()
      Specifies that this is a natural set operation, i.e. not excluding duplicates.
      Returns:
      the modified set operation.
    • operand

      public SelectStatement operand()
      Gets the operand of this set operation.
      Returns:
      the operand.
    • sql

      public String sql(Context context)
      Description copied from interface: Sql
      Formats object as an SQL fragment.
      Specified by:
      sql in interface Sql
      Parameters:
      context - the context (incl. dialect).
      Returns:
      the formatted SQL fragment.
    • params

      public Stream<Object> params(Context context)
      Description copied from interface: Sql
      Gets the statement parameters introduced by this fragment.
      Specified by:
      params in interface Sql
      Parameters:
      context - the context (incl. dialect).
      Returns:
      the statement parameters.
    • columnRefs

      public Stream<Column> columnRefs()
      Description copied from interface: Sql
      Gets the columns referenced by this fragment. For validation purposes.
      Specified by:
      columnRefs in interface Sql
      Returns:
      the columns referenced by this fragment.
    • aliasRefs

      public Stream<ColumnAlias> aliasRefs()
      Description copied from interface: Sql
      Gets the column aliases referenced by this fragment. For validation purposes.
      Specified by:
      aliasRefs in interface Sql
      Returns:
      the column aliases referenced by this fragment.