All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.Select Maven / Gradle / Ivy

There is a newer version: 3.19.15
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package org.jooq;

// ...
// ...
// ...
// ...
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.DERBY;
// ...
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.HSQLDB;
import static org.jooq.SQLDialect.IGNITE;
// ...
// ...
import static org.jooq.SQLDialect.MARIADB;
// ...
// ...
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
// ...
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
// ...
import static org.jooq.SQLDialect.YUGABYTEDB;

import java.util.Collection;
import java.util.List;

import org.jooq.impl.DSL;
import org.jooq.impl.QOM;
import org.jooq.impl.QOM.UnmodifiableList;
import org.jooq.impl.QOM.With;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.ApiStatus.Experimental;

/**
 * A SELECT statement.
 * 

* Example: *

*


 * // Assuming import static org.jooq.impl.DSL.*;
 *
 * using(configuration)
 *    .select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME)
 *    .from(ACTOR)
 *    .fetch();
 * 
*

* Instances can be created using {@link DSL#select(SelectFieldOrAsterisk...)}, * or {@link DSLContext#selectQuery()} and overloads. * * @param The record type being returned by this query * @author Lukas Eder */ public non-sealed interface Select extends ResultQuery, TableLike, FieldLike, FieldOrRowOrSelect { /** * Apply the UNION set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support Select union(Select select); /** * Apply the UNION ALL set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support Select unionAll(Select select); /** * Apply the EXCEPT (or MINUS) set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support({ CUBRID, DERBY, H2, HSQLDB, IGNITE, MARIADB, POSTGRES, SQLITE, YUGABYTEDB }) Select except(Select select); /** * Apply the EXCEPT ALL set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support({ CUBRID, DERBY, HSQLDB, POSTGRES, YUGABYTEDB }) Select exceptAll(Select select); /** * Apply the INTERSECT set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support({ CUBRID, DERBY, H2, HSQLDB, IGNITE, MARIADB, POSTGRES, SQLITE, YUGABYTEDB }) Select intersect(Select select); /** * Apply the INTERSECT ALL set operation. * * @throws IllegalArgumentException If the argument select has the same * identity as this select. The jOOQ 3.x API is mutable, which * means that calls to the DSL API mutate this instance. Adding * this instance as an set operation argument would lead to a * {@link StackOverflowError} when generating the SQL. */ @NotNull @CheckReturnValue @Support({ CUBRID, DERBY, HSQLDB, POSTGRES, YUGABYTEDB }) Select intersectAll(Select select); /** * All fields selected in this query */ @NotNull @CheckReturnValue List> getSelect(); // ------------------------------------------------------------------------- // XXX: Query Object Model // ------------------------------------------------------------------------- /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable With $with(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull UnmodifiableList $select(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $select(Collection newSelect); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental boolean $distinct(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $distinct(boolean newDistinct); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull UnmodifiableList> $from(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $from(Collection> newFrom); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable Condition $where(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $where(Condition newWhere); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull UnmodifiableList $groupBy(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $groupBy(Collection newGroupBy); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental boolean $groupByDistinct(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $groupByDistinct(boolean newGroupByDistinct); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable Condition $having(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $having(Condition newHaving); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull UnmodifiableList $window(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $window(Collection newWindow); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable Condition $qualify(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $qualify(Condition newQualify); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull UnmodifiableList> $orderBy(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $orderBy(Collection> newOrderBy); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable Field $limit(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $limit(Field newLimit); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental boolean $limitPercent(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $limitPercent(boolean newLimitPercent); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental boolean $limitWithTies(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $limitWithTies(boolean newLimitWithTies); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @Nullable Field $offset(); /** * Experimental query object model accessor method, see also {@link QOM}. * Subject to change in future jOOQ versions, use at your own risk. */ @Experimental @NotNull Select $offset(Field newOffset); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy