Interface SQLCommonQuery<Q extends SQLCommonQuery<Q>>

Type Parameters:
Q - concrete type
All Superinterfaces:
FilteredClause<Q>, Query<Q>, SimpleQuery<Q>
All Known Implementing Classes:
AbstractMySQLQuery, AbstractOracleQuery, AbstractPostgreSQLQuery, AbstractSQLQuery, AbstractSQLServerQuery, AbstractTeradataQuery, MySQLQuery, OracleQuery, PostgreSQLQuery, ProjectableSQLQuery, SQLQuery, SQLServerQuery, TeradataQuery

public interface SQLCommonQuery<Q extends SQLCommonQuery<Q>> extends Query<Q>
SQLCommonQuery is a common interface for SQLQuery and SQLSubQuery
Author:
tiwe
  • Method Details

    • addFlag

      Q addFlag(QueryFlag.Position position, Expression<?> flag)
      Add the given Expression as a query flag
      Parameters:
      position - position
      flag - query flag
      Returns:
      the current object
    • addFlag

      Q addFlag(QueryFlag.Position position, String flag)
      Add the given String literal as query flag
      Parameters:
      position - position
      flag - query flag
      Returns:
      the current object
    • addFlag

      Q addFlag(QueryFlag.Position position, String prefix, Expression<?> expr)
      Add the given prefix and expression as a general query flag
      Parameters:
      position - position of the flag
      prefix - prefix for the flag
      expr - expression of the flag
      Returns:
      the current object
    • addJoinFlag

      Q addJoinFlag(String flag)
      Add the given String literal as a join flag to the last added join with the position BEFORE_TARGET
      Parameters:
      flag - join flag
      Returns:
      the current object
    • addJoinFlag

      Q addJoinFlag(String flag, JoinFlag.Position position)
      Add the given String literal as a join flag to the last added join
      Parameters:
      flag - join flag
      position - position
      Returns:
      the current object
    • from

      Q from(Expression<?>... o)
      Defines the sources of the query
      Parameters:
      o - from
      Returns:
      the current object
    • from

      Q from(SubQueryExpression<?> subQuery, Path<?> alias)
      Adds a sub query source
      Parameters:
      subQuery - sub query
      alias - alias
      Returns:
      the current object
    • fullJoin

      Q fullJoin(EntityPath<?> o)
      Adds a full join to the given target
      Parameters:
      o - full join target
      Returns:
      the current object
    • fullJoin

      <E> Q fullJoin(EntityPath<E> o, Path<E> alias)
      Adds a full join to the given target
      Type Parameters:
      E -
      Parameters:
      o - full join target
      alias - alias
      Returns:
      the current object
    • fullJoin

      <E> Q fullJoin(RelationalFunctionCall<E> o, Path<E> alias)
      Adds a full join to the given target
      Type Parameters:
      E -
      Parameters:
      o - full join target
      alias - alias
      Returns:
      the current object
    • fullJoin

      <E> Q fullJoin(ForeignKey<E> key, RelationalPath<E> entity)
      Adds a full join to the given target
      Type Parameters:
      E -
      Parameters:
      key - foreign key for join
      entity - join target
      Returns:
      the current object
    • fullJoin

      Q fullJoin(SubQueryExpression<?> o, Path<?> alias)
      Adds a full join to the given target
      Parameters:
      o - subquery
      alias - alias
      Returns:
      the current object
    • innerJoin

      Q innerJoin(EntityPath<?> o)
      Adds an inner join to the given target
      Parameters:
      o -
      Returns:
      the current object
    • innerJoin

      <E> Q innerJoin(EntityPath<E> o, Path<E> alias)
      Adds an inner join to the given target
      Type Parameters:
      E -
      Parameters:
      o - inner join target
      alias - alias
      Returns:
      the current object
    • innerJoin

      <E> Q innerJoin(RelationalFunctionCall<E> o, Path<E> alias)
      Adds a inner join to the given target
      Type Parameters:
      E -
      Parameters:
      o - relational function call
      alias - alias
      Returns:
      the current object
    • innerJoin

      <E> Q innerJoin(ForeignKey<E> foreign, RelationalPath<E> entity)
      Adds an inner join to the given target
      Type Parameters:
      E -
      Parameters:
      foreign - foreign key to use for join
      entity - join target
      Returns:
      the current object
    • innerJoin

      Q innerJoin(SubQueryExpression<?> o, Path<?> alias)
      Adds an inner join to the given target
      Parameters:
      o - subquery
      alias - alias
      Returns:
      the current object
    • join

      Q join(EntityPath<?> o)
      Adds a join to the given target
      Parameters:
      o - join target
      Returns:
      the current object
    • join

      <E> Q join(EntityPath<E> o, Path<E> alias)
      Adds a join to the given target
      Type Parameters:
      E -
      Parameters:
      o - join target
      alias - alias
      Returns:
      the current object
    • join

      <E> Q join(RelationalFunctionCall<E> o, Path<E> alias)
      Adds a join to the given target
      Type Parameters:
      E -
      Parameters:
      o - join target
      alias - alias
      Returns:
      the current object
    • join

      <E> Q join(ForeignKey<E> foreign, RelationalPath<E> entity)
      Adds a join to the given target
      Type Parameters:
      E -
      Parameters:
      foreign - foreign key to use for join
      entity - join target
      Returns:
      the current object
    • join

      Q join(SubQueryExpression<?> o, Path<?> alias)
      Adds a join to the given target
      Parameters:
      o - subquery
      alias - alias
      Returns:
      the current object
    • leftJoin

      Q leftJoin(EntityPath<?> o)
      Adds a left join to the given target
      Parameters:
      o - join target
      Returns:
      the current object
    • leftJoin

      <E> Q leftJoin(EntityPath<E> o, Path<E> alias)
      Adds a left join to the given target
      Type Parameters:
      E -
      Parameters:
      o - left join target
      alias - alias
      Returns:
      the current object
    • leftJoin

      <E> Q leftJoin(RelationalFunctionCall<E> o, Path<E> alias)
      Adds a left join to the given target
      Type Parameters:
      E -
      Parameters:
      o - relational function call
      alias - alias
      Returns:
      the current object
    • leftJoin

      <E> Q leftJoin(ForeignKey<E> foreign, RelationalPath<E> entity)
      Adds a left join to the given target
      Type Parameters:
      E -
      Parameters:
      foreign - foreign key to use for join
      entity - join target
      Returns:
      the current object
    • leftJoin

      Q leftJoin(SubQueryExpression<?> o, Path<?> alias)
      Adds a left join to the given target
      Parameters:
      o - subquery
      alias - alias
      Returns:
      the current object
    • on

      Q on(Predicate... conditions)
      Defines a filter to the last added join
      Parameters:
      conditions - join conditions
      Returns:
      the current object
    • rightJoin

      Q rightJoin(EntityPath<?> o)
      Adds a right join to the given target
      Parameters:
      o - join target
      Returns:
      the current object
    • rightJoin

      <E> Q rightJoin(EntityPath<E> o, Path<E> alias)
      Adds a right join to the given target
      Type Parameters:
      E -
      Parameters:
      o - right join target
      alias - alias
      Returns:
      the current object
    • rightJoin

      <E> Q rightJoin(RelationalFunctionCall<E> o, Path<E> alias)
      Adds a full join to the given target
      Type Parameters:
      E -
      Parameters:
      o - relational function call
      alias - alias
      Returns:
      the current object
    • rightJoin

      <E> Q rightJoin(ForeignKey<E> foreign, RelationalPath<E> entity)
      Adds a right join to the given target
      Type Parameters:
      E -
      Parameters:
      foreign - foreign key to use for join
      entity - join target
      Returns:
      the current object
    • rightJoin

      Q rightJoin(SubQueryExpression<?> o, Path<?> alias)
      Adds a right join to the given target
      Parameters:
      o - subquery
      alias - alias
      Returns:
      the current object
    • with

      Q with(Path<?> alias, SubQueryExpression<?> o)
      Adds a common table expression

      Usage

       query.with(alias, subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      o - subquery
      Returns:
      the current object
    • with

      Q with(Path<?> alias, Expression<?> query)
      Adds a common table expression

      Usage

       query.with(alias, subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      query - subquery
      Returns:
      the current object
    • with

      WithBuilder<Q> with(Path<?> alias, Path<?>... columns)
      Adds a common table expression

      Usage

       query.with(alias, columns...).as(subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      columns - columns to use
      Returns:
      the current object
    • withRecursive

      Q withRecursive(Path<?> alias, SubQueryExpression<?> o)
      Adds a common table expression

      Usage

       query.withRecursive(alias, subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      o - subquery
      Returns:
      the current object
    • withRecursive

      Q withRecursive(Path<?> alias, Expression<?> query)
      Adds a common table expression

      Usage

       query.withRecursive(alias, subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      query - subquery
      Returns:
      the current object
    • withRecursive

      WithBuilder<Q> withRecursive(Path<?> alias, Path<?>... columns)
      Adds a common table expression

      Usage

       query.withRecursive(alias, columns...).as(subQuery)
            .from(...)
       
      Parameters:
      alias - alias for query
      columns - columns to use
      Returns:
      builder for with part