Class Join

java.lang.Object
io.github.torand.fastersql.join.Join
All Implemented Interfaces:
Sql

public class Join extends Object implements Sql
Implements a JOIN clause.
  • Constructor Details

    • Join

      public Join(Column left, Column right)
      Creates a join clause.
      Parameters:
      left - the left side of the join.
      right - the right side of the join.
  • Method Details

    • leftOuter

      public Join leftOuter()
      Specifies that this is a LEFT OUTER JOIN clause.
      Returns:
      the modified JOIN clause.
    • rightOuter

      public Join rightOuter()
      Specifies that this is a RIGHT OUTER JOIN clause.
      Returns:
      the modified JOIN clause.
    • and

      public Join and(Join next)
      Creates a nested JOIN clause by combining this JOIN clause with the specified JOIN clause.
      Parameters:
      next - the JOIN clause to combine with.
      Returns:
      the nested JOIN clause.
    • joined

      public Table<?> joined()
      Gets the table joined with.
      Returns:
      the table joined with.
    • 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.