/*
* 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
*
* https://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
* Apache-2.0 license and offer limited warranties, support, maintenance, and
* commercial database integrations.
*
* For more information, please visit: https://www.jooq.org/legal/licensing
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableCollection;
import static java.util.Collections.unmodifiableList;
import static java.util.Collections.unmodifiableMap;
import static org.jooq.impl.DSL.keyword;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.function.BiPredicate;
import java.util.function.Predicate;
import java.util.stream.Collector;
// ...
import org.jooq.Catalog;
import org.jooq.CheckReturnValue;
import org.jooq.Collation;
import org.jooq.Comment;
import org.jooq.CommonTableExpression;
import org.jooq.Comparator;
import org.jooq.Condition;
import org.jooq.Constraint;
import org.jooq.DDLQuery;
import org.jooq.DMLQuery;
import org.jooq.DataType;
import org.jooq.DatePart;
import org.jooq.Domain;
import org.jooq.Field;
import org.jooq.FieldOrRow;
import org.jooq.FieldOrRowOrSelect;
import org.jooq.Function0;
import org.jooq.Function1;
import org.jooq.Function10;
import org.jooq.Function11;
import org.jooq.Function12;
import org.jooq.Function13;
import org.jooq.Function14;
import org.jooq.Function15;
import org.jooq.Function16;
import org.jooq.Function17;
import org.jooq.Function18;
import org.jooq.Function19;
import org.jooq.Function2;
import org.jooq.Function20;
import org.jooq.Function21;
import org.jooq.Function22;
import org.jooq.Function3;
import org.jooq.Function4;
import org.jooq.Function5;
import org.jooq.Function6;
import org.jooq.Function7;
import org.jooq.Function8;
import org.jooq.Function9;
import org.jooq.Geometry;
import org.jooq.GroupField;
import org.jooq.Index;
import org.jooq.JSON;
import org.jooq.JSONB;
import org.jooq.JSONEntry;
import org.jooq.Keyword;
import org.jooq.Lambda1;
// ...
import org.jooq.Name;
import org.jooq.Operator;
import org.jooq.OrderField;
import org.jooq.Param;
import org.jooq.Parameter;
import org.jooq.Privilege;
// ...
import org.jooq.Query;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.Record1;
// ...
import org.jooq.Result;
import org.jooq.ResultQuery;
import org.jooq.Role;
import org.jooq.Row;
import org.jooq.RowCountQuery;
import org.jooq.RowId;
import org.jooq.SQL;
import org.jooq.SQLDialect;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.SelectFieldOrAsterisk;
import org.jooq.Sequence;
import org.jooq.SortField;
import org.jooq.Spatial;
import org.jooq.Statement;
// ...
import org.jooq.Table;
import org.jooq.TableElement;
import org.jooq.TableLike;
// ...
// ...
import org.jooq.Type;
// ...
import org.jooq.WindowDefinition;
import org.jooq.WindowSpecification;
import org.jooq.XML;
import org.jooq.XMLAttributes;
import org.jooq.conf.Settings;
import org.jooq.types.DayToSecond;
// ...
import org.jetbrains.annotations.ApiStatus.Experimental;
import org.jetbrains.annotations.ApiStatus.Internal;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* A draft of the new query object model API.
*
* This API is EXPERIMENTAL. Use at your own risk.
*
*
Purpose
*
* This class provides a single namespace for jOOQ's query object model API.
* Every {@link QueryPart} from the DSL API has a matching {@link QueryPart}
* representation in this query object model API, and a shared internal
* implementation in the org.jooq.impl package, that covers both
* the DSL and model API functionality.
*
* The goal of this model API is to allow for expression tree transformations
* via {@link QueryPart#$replace(Replacer)} as well as via per-querypart
* methods, such as for example {@link Substring#$startingPosition(Field)}, and
* traversals via {@link QueryPart#$traverse(Traverser)} that are independent of
* the DSL API that would otherwise be too noisy for this task.
*
*
Design
*
* In order to avoid conflicts between the model API and the DSL API, all model
* API in this class follows these naming conventions:
*
*
All public model API types are nested in the {@link QOM} class, whereas
* DSL API types are top level types in the org.jooq package.
*
All accessor methods and their corresponding "immutable setters"
* (returning a copy containing the modification) are named
* $property(), e.g. {@link Substring#$startingPosition()} and
* {@link Substring#$startingPosition(Field)}.
*
All private model API utility types are named UXyz, e.g.
* {@link UEmpty}
*
*
*
Limitations
*
* The API offers public access to jOOQ's internal representation, and as such,
* is prone to incompatible changes between minor releases, in addition to the
* incompatible changes that may arise due to this API being experimental. In
* this experimental stage, the following limitations are accepted:
*
*
Not all {@link QueryPart} implementations have a corresponding public
* {@link QueryPart} type yet, but may just implement the API via a
* {@link UEmpty} or {@link UNotYetImplemented} subtype, and may not provide
* access to contents via accessor methods.
*
Some child elements of a {@link QueryPart} may not yet be represented in
* the model API, such as for example the SELECT … FOR UPDATE
* clause, as substantial changes to the internal model are still required
* before being able to offer public access to it.
*
*
*
Mutability
*
* While some elements of this API are historically mutable (either mutable
* objects are returned from {@link QueryPart} subtypes, or argument objects
* when constructing an {@link QueryPart} remains mutable, rather than copied),
* users must not rely on this mutable behaviour. Once this API stabilises, all
* mutability will be gone, accidental remaining mutability will be considered a
* bug.
*
*
Notes
*
* A future Java 17 distribution of jOOQ might make use of sealed types to
* improve the usability of the model API in pattern matching expressions etc.
* Other Java language features that benefit pattern matching expression trees
* might be adopted in the future in this area of the jOOQ API.
*
* @author Lukas Eder
*/
@Experimental
public final class QOM {
// -------------------------------------------------------------------------
// XXX: Model
// -------------------------------------------------------------------------
// public interface Lambda1
// extends
// org.jooq.QueryPart
// {
//
// /**
// * The first argument of the lambda.
// */
// @NotNull Field $arg1();
//
// /**
// * The lambda result.
// */
// @NotNull Field $result();
// }
// This class uses a lot of fully qualified types, because of some javac bug
// In Java 1.8.0_302, which hasn't been analysed and reproduced yet in a more
// minimal example. Without the qualification, the types cannot be found
// despite being imported
/**
* A generic tuple of degree 2 for use in {@link QOM} types.
*/
public interface Tuple2
extends
org.jooq.QueryPart
{
/**
* The first value in the tuple.
*/
@NotNull Q1 $1();
/**
* The second value in the tuple.
*/
@NotNull Q2 $2();
/**
* Set the first value in the tuple.
*/
@CheckReturnValue
@NotNull Tuple2 $1(Q1 newPart1);
/**
* Set the second value in the tuple.
*/
@CheckReturnValue
@NotNull Tuple2 $2(Q2 newPart2);
}
/**
* An unmodifiable {@link Map} of {@link QueryPart} keys and values.
*/
public interface UnmodifiableMap
extends
org.jooq.QueryPart,
java.util.Map
{
/**
* Get the {@link #entrySet()} of this map as a list of tuples.
*/
@NotNull UnmodifiableList> $tuples();
}
/**
* An unmodifiable {@link Collection} of {@link QueryPart} elements.
*/
public interface UnmodifiableCollection
extends
org.jooq.QueryPart,
java.util.Collection
{}
/**
* An unmodifiable {@link List} of {@link QueryPart} elements.
*/
public interface UnmodifiableList
extends
UnmodifiableCollection,
java.util.List
{
// TODO: These methods could return unmodifiable views instead, to avoid
// copying things around...
/**
* Collect the contents of this list using a {@link Collector}.
*/
default R $collect(Collector collector) {
return stream().collect(collector);
}
/**
* Concatenate a collection to this UnmodifiableList, returning a new
* UnmodifiableList from the combined data.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $concat(Collection extends Q> other) {
QueryPartList r = new QueryPartList<>(this);
r.addAll(other);
return unmodifiable(r);
}
/**
* Return a new UnmodifiableList without the element at the argument
* position.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $remove(int position) {
QueryPartList r = new QueryPartList<>();
for (int i = 0; i < size(); i++)
if (i != position)
r.add(get(i));
return unmodifiable(r);
}
/**
* Access the first element if available.
*/
@Nullable
default Q $first() {
return isEmpty() ? null : get(0);
}
/**
* Access the last element if available.
*/
@Nullable
default Q $last() {
return isEmpty() ? null : get(size() - 1);
}
/**
* Return a new UnmodifiableList without the {@link #$first()} element.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $removeFirst() {
QueryPartList r = new QueryPartList<>();
for (int i = 1; i < size(); i++)
r.add(get(i));
return unmodifiable(r);
}
/**
* Return a new {@link UnmodifiableList} without the {@link #$last()}
* element.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $removeLast() {
QueryPartList r = new QueryPartList<>();
for (int i = 0; i < size() - 1; i++)
r.add(get(i));
return unmodifiable(r);
}
/**
* Return a new {@link UnmodifiableList} with a new, replaced value at
* the argument position.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $set(int position, Q newValue) {
QueryPartList r = new QueryPartList<>();
for (int i = 0; i < size(); i++)
if (i == position)
r.add(newValue);
else
r.add(get(i));
return unmodifiable(r);
}
/**
* Return a new {@link UnmodifiableList} with a new, replaced set of
* values at the argument position.
*/
@NotNull
@CheckReturnValue
default UnmodifiableList $setAll(int position, Collection extends Q> newValues) {
QueryPartList r = new QueryPartList<>();
for (int i = 0; i < size(); i++)
if (i == position)
r.addAll(newValues);
else
r.add(get(i));
return unmodifiable(r);
}
}
/**
* A WITH clause of a {@link Select}, {@link Insert},
* {@link Update}, or {@link Delete} statement.
*/
public interface With
extends
org.jooq.QueryPart
{
@NotNull UnmodifiableList extends CommonTableExpression>> $commonTableExpressions();
@CheckReturnValue
@NotNull
With $commonTableExpressions(UnmodifiableList extends CommonTableExpression>> commonTableExpressions);
boolean $recursive();
@CheckReturnValue
@NotNull
With $recursive(boolean recursive);
}
/**
* A {@link QueryPart} that may associate an {@link #$alias()} with the
* {@link #$aliased()} part.
*/
public interface Aliasable
extends
org.jooq.QueryPart
{
/**
* The aliased part (a {@link Field} or a {@link Table}).
*/
@NotNull Q $aliased();
/**
* The alias if any.
*/
@Nullable Name $alias();
}
// -------------------------------------------------------------------------
// XXX: Queries
// -------------------------------------------------------------------------
/**
* The INSERT statement.
*/
public interface Insert
extends
org.jooq.DMLQuery
{
@Nullable With $with();
@NotNull Table $into();
@CheckReturnValue
@NotNull Insert> $into(Table> into);
@NotNull UnmodifiableList extends Field>> $columns();
@CheckReturnValue
@NotNull Insert> $columns(Collection extends Field>> columns);
@Nullable Select> $select();
@CheckReturnValue
@NotNull Insert> $select(Select> select);
boolean $defaultValues();
@CheckReturnValue
@NotNull Insert> $defaultValues(boolean defaultValues);
@NotNull UnmodifiableList extends Row> $values();
@CheckReturnValue
@NotNull Insert> $values(Collection extends Row> values);
boolean $onDuplicateKeyIgnore();
@CheckReturnValue
@NotNull Insert> $onDuplicateKeyIgnore(boolean onDuplicateKeyIgnore);
boolean $onDuplicateKeyUpdate();
@CheckReturnValue
@NotNull Insert> $onDuplicateKeyUpdate(boolean onDuplicateKeyUpdate);
@NotNull UnmodifiableList extends Field>> $onConflict();
@CheckReturnValue
@NotNull Insert> $onConflict(Collection extends Field>> onConflictFields);
// [#13640] TODO: What to do about the CONSTRAINT? Re-design this model?
@Nullable Condition $onConflictWhere();
@CheckReturnValue
@NotNull Insert> $onConflictWhere(Condition where);
@NotNull UnmodifiableMap extends FieldOrRow, ? extends FieldOrRowOrSelect> $updateSet();
@CheckReturnValue
@NotNull Insert> $updateSet(Map extends FieldOrRow, ? extends FieldOrRowOrSelect> updateSet);
@Nullable Condition $updateWhere();
@CheckReturnValue
@NotNull Insert> $updateWhere(Condition where);
}
/**
* An INSERT statement with a RETURNING clause.
*/
public interface InsertReturning
extends
org.jooq.ResultQuery
{
@NotNull Insert> $insert();
@CheckReturnValue
@NotNull InsertReturning $insert(Insert> insert);
@NotNull UnmodifiableList extends SelectFieldOrAsterisk> $returning();
@CheckReturnValue
@NotNull InsertReturning> $returning(Collection extends SelectFieldOrAsterisk> returning);
}
/**
* The UPDATE statement.
*/
public interface Update
extends
org.jooq.DMLQuery
{
@Nullable With $with();
@NotNull Table $table();
@CheckReturnValue
@NotNull Update> $table(Table> table);
@NotNull UnmodifiableList extends Table>> $from();
@CheckReturnValue
@NotNull Update $from(Collection extends Table>> from);
@NotNull UnmodifiableMap extends FieldOrRow, ? extends FieldOrRowOrSelect> $set();
@CheckReturnValue
@NotNull Update $set(Map extends FieldOrRow, ? extends FieldOrRowOrSelect> set);
@Nullable Condition $where();
@CheckReturnValue
@NotNull Update $where(Condition condition);
@NotNull UnmodifiableList extends SortField>> $orderBy();
@CheckReturnValue
@NotNull Update $orderBy(Collection extends SortField>> orderBy);
@Nullable Field extends Number> $limit();
@CheckReturnValue
@NotNull Update $limit(Field extends Number> limit);
}
/**
* An UPDATE statement with a RETURNING clause.
*/
public interface UpdateReturning
extends
org.jooq.ResultQuery
{
@NotNull Update> $update();
@CheckReturnValue
@NotNull UpdateReturning $update(Update> update);
@NotNull UnmodifiableList extends SelectFieldOrAsterisk> $returning();
@CheckReturnValue
@NotNull UpdateReturning> $returning(Collection extends SelectFieldOrAsterisk> returning);
}
/**
* The DELETE statement.
*/
public interface Delete
extends
org.jooq.DMLQuery
{
@Nullable With $with();
@NotNull Table $from();
@CheckReturnValue
@NotNull Delete> $from(Table> table);
@NotNull UnmodifiableList extends Table>> $using();
@CheckReturnValue
@NotNull Delete $using(Collection extends Table>> using);
@Nullable Condition $where();
@CheckReturnValue
@NotNull Delete $where(Condition condition);
@NotNull UnmodifiableList extends SortField>> $orderBy();
@CheckReturnValue
@NotNull Delete $orderBy(Collection extends SortField>> orderBy);
@Nullable Field extends Number> $limit();
@CheckReturnValue
@NotNull Delete $limit(Field extends Number> limit);
}
/**
* An DELETE statement with a RETURNING clause.
*/
public interface DeleteReturning
extends
org.jooq.ResultQuery
{
@NotNull Delete> $delete();
@CheckReturnValue
@NotNull DeleteReturning $delete(Delete> delete);
@NotNull UnmodifiableList extends SelectFieldOrAsterisk> $returning();
@CheckReturnValue
@NotNull DeleteReturning> $returning(Collection extends SelectFieldOrAsterisk> returning);
}
public interface Merge
extends
org.jooq.DMLQuery
{
@Nullable With $with();
@NotNull Table $into();
@CheckReturnValue
@NotNull Merge> $into(Table> into);
@Nullable TableLike> $using();
@CheckReturnValue
@NotNull Merge $using(TableLike> into);
@Nullable Condition $on();
@CheckReturnValue
@NotNull Merge $on(Condition condition);
@NotNull UnmodifiableList extends MergeMatched> $whenMatched();
@CheckReturnValue
@NotNull Merge $whenMatched(Collection extends MergeMatched> whenMatched);
@NotNull UnmodifiableList extends MergeNotMatched> $whenNotMatched();
@CheckReturnValue
@NotNull Merge $whenNotMatched(Collection extends MergeNotMatched> whenNotMatched);
@NotNull UnmodifiableList extends MergeNotMatchedBySource> $whenNotMatchedBySource();
@CheckReturnValue
@NotNull Merge $whenNotMatchedBySource(Collection extends MergeNotMatchedBySource> whenNotMatchedBySource);
}
public interface MergeMatched
extends
org.jooq.QueryPart
{
@NotNull UnmodifiableMap extends FieldOrRow, ? extends FieldOrRowOrSelect> $updateSet();
@CheckReturnValue
@NotNull MergeMatched $updateSet(Map extends FieldOrRow, ? extends FieldOrRowOrSelect> updateSet);
boolean $delete();
@CheckReturnValue
@NotNull MergeMatched $delete(boolean delete);
@Nullable Condition $where();
@CheckReturnValue
@NotNull MergeMatched $where(Condition condition);
}
public interface MergeNotMatched
extends
org.jooq.QueryPart
{
@NotNull UnmodifiableList extends Field>> $columns();
@CheckReturnValue
@NotNull MergeNotMatched $columns(Collection extends Field>> columns);
@NotNull UnmodifiableList extends Row> $values();
@CheckReturnValue
@NotNull MergeNotMatched $values(Collection extends Row> values);
@Nullable Condition $where();
@CheckReturnValue
@NotNull MergeNotMatched $where(Condition condition);
}
public interface MergeNotMatchedBySource
extends
org.jooq.QueryPart
{
@NotNull UnmodifiableMap extends FieldOrRow, ? extends FieldOrRowOrSelect> $updateSet();
@CheckReturnValue
@NotNull MergeMatched $updateSet(Map extends FieldOrRow, ? extends FieldOrRowOrSelect> updateSet);
boolean $delete();
@CheckReturnValue
@NotNull MergeMatched $delete(boolean delete);
@Nullable Condition $where();
@CheckReturnValue
@NotNull MergeMatched $where(Condition condition);
}
// -------------------------------------------------------------------------
// XXX: Schema
// -------------------------------------------------------------------------
/**
* A table with a MySQL style index access hint.
*/
public interface HintedTable
extends
Table
{
@NotNull Table $table();
@CheckReturnValue
@NotNull HintedTable $table(Table newTable);
}
/**
* A collection derived table or table valued function with a
* WITH ORDINALITY clause.
*/
public interface WithOrdinalityTable
extends
Table
{
@NotNull Table> $table();
@CheckReturnValue
@NotNull WithOrdinalityTable> $table(Table> newTable);
}
/**
* A PRIMARY KEY constraint.
*/
public interface PrimaryKey
extends
org.jooq.Constraint
{
@Override
@NotNull Name $name();
@CheckReturnValue
@NotNull Constraint $name(Name newName);
boolean $enforced();
@CheckReturnValue
@NotNull Constraint $enforced(boolean newEnforced);
@NotNull UnmodifiableList extends Field>> $fields();
@CheckReturnValue
@NotNull PrimaryKey $fields(UnmodifiableList extends Field>> newFields);
}
/**
* A UNIQUE constraint.
*/
public interface UniqueKey
extends
org.jooq.Constraint
{
@Override
@NotNull Name $name();
@CheckReturnValue
@NotNull Constraint $name(Name newName);
boolean $enforced();
@CheckReturnValue
@NotNull Constraint $enforced(boolean newEnforced);
@NotNull UnmodifiableList extends Field>> $fields();
@CheckReturnValue
@NotNull UniqueKey $fields(UnmodifiableList extends Field>> newFields);
}
/**
* A FOREIGN KEY constraint.
*/
public interface ForeignKey
extends
org.jooq.Constraint
{
@Override
@NotNull Name $name();
@CheckReturnValue
@NotNull Constraint $name(Name newName);
boolean $enforced();
@CheckReturnValue
@NotNull Constraint $enforced(boolean newEnforced);
@NotNull UnmodifiableList extends Field>> $fields();
@CheckReturnValue
@NotNull ForeignKey $fields(UnmodifiableList extends Field>> newFields);
@NotNull Table> $referencesTable();
@CheckReturnValue
@NotNull ForeignKey $referencesTable(Table> newReferencesTable);
@NotNull UnmodifiableList extends Field>> $referencesFields();
@CheckReturnValue
@NotNull ForeignKey $referencesFields(UnmodifiableList extends Field>> newReferencesFields);
@Nullable ForeignKeyRule $deleteRule();
@CheckReturnValue
@NotNull ForeignKey $deleteRule(ForeignKeyRule newDeleteRule);
@Nullable ForeignKeyRule $updateRule();
@CheckReturnValue
@NotNull ForeignKey $updateRule(ForeignKeyRule newDeleteRule);
}
/**
* A CHECK constraint.
*/
public interface Check
extends
org.jooq.Constraint
{
@Override
@NotNull Name $name();
@CheckReturnValue
@NotNull Constraint $name(Name newName);
boolean $enforced();
@CheckReturnValue
@NotNull Constraint $enforced(boolean newEnforced);
@NotNull Condition $condition();
@CheckReturnValue
@NotNull Check $condition(Condition newCondition);
}
// -------------------------------------------------------------------------
// XXX: Statements
// -------------------------------------------------------------------------
public interface NullStatement extends Statement {}
// -------------------------------------------------------------------------
// XXX: Tables
// -------------------------------------------------------------------------
public interface TableAlias
extends
Table,
Aliasable
>
{
@NotNull Table $table();
@Override
@NotNull default Table $aliased() {
return $table();
}
@Override
@NotNull Name $alias();
// TODO [#12425] Reuse MDerivedColumnList
}
public interface Dual extends Table, UEmpty {}
public interface Lateral extends Table, UOperator1
, Lateral> {}
public interface DerivedTable extends org.jooq.Table, UOperator1, DerivedTable> {}
public interface Values extends Table, UOperator1, Values> {}
public interface DataChangeDeltaTable extends Table {
@NotNull ResultOption $resultOption();
@NotNull DMLQuery $query();
}
public interface RowsFrom extends Table {
@NotNull UnmodifiableList extends Table>> $tables();
}
public interface GenerateSeries extends Table>, UOperator3, Field, Field, GenerateSeries> {
@NotNull default Field $from() { return $arg1(); }
@NotNull default Field $to() { return $arg2(); }
@Nullable default Field $step() { return $arg3(); }
}
// -------------------------------------------------------------------------
// XXX: Conditions
// -------------------------------------------------------------------------
/**
* A {@link Condition} that is always TRUE.
*/
public interface True
extends
Condition
{}
/**
* A {@link Condition} that is always FALSE.
*/
public interface False
extends
Condition
{}
/**
* A {@link Condition} that is always NULL.
*/
public interface Null
extends
Condition
{}
/**
* A {@link Condition} consisting of two {@link Condition} operands and a
* binary logic {@link Operator}.
*/
public /*sealed*/ interface CombinedCondition>
extends
Condition,
UCommutativeOperator
/*permits
MAnd,
MOr*/
{}
/**
* A {@link Condition} consisting of two {@link Field} operands and a
* {@link Comparator} operator.
*/
public /*sealed*/ interface CompareCondition>
extends
Condition,
UOperator2, Field, R>
/*permits
MEq,
MNe,
MLt,
MLe,
MGt,
MGe,
MIsDistinctFrom,
MIsNotDistinctFrom,
MContains,
MContainsIgnoreCase,
MStartsWith,
MStartsWithIgnoreCase,
MEndsWith,
MEndsWithIgnoreCase*/
{}
/**
* The BETWEEN predicate.
*/
public interface Between
extends
Condition,
UOperator3, Field, Field, Between>
{
boolean $symmetric();
@NotNull Between $symmetric(boolean symmetric);
}
/**
* The IN predicate accepting a list of values.
*/
public /*sealed*/ interface InList
extends
Condition,
UOperator2, UnmodifiableList extends Field>, InList>
/*permits
InList*/
{
@NotNull default Field $field() { return $arg1(); }
@NotNull default UnmodifiableList extends Field> $list() { return $arg2(); }
}
/**
* The NOT IN predicate accepting a list of values.
*/
public /*sealed*/ interface NotInList
extends
Condition,
UOperator2, UnmodifiableList extends Field>, NotInList>
/*permits
NotInList*/
{
@NotNull default Field $field() { return $arg1(); }
@NotNull default UnmodifiableList extends Field> $list() { return $arg2(); }
}
public /*sealed*/ interface RegexpLike
extends
Condition
/*permits
RegexpLike*/
{
@NotNull Field> $search();
@NotNull Field $pattern();
}
public /*sealed*/ interface Extract
extends
Field
/*permits
Extract*/
{
@NotNull Field> $field();
@NotNull DatePart $datePart();
}
public /*sealed*/ interface RowIsNull
extends
Condition,
UOperator1
/*permits
RowIsNull*/
{
@NotNull default Row $field() { return $arg1(); }
}
public /*sealed*/ interface RowIsNotNull
extends
Condition,
UOperator1
/*permits
RowIsNotNull*/
{
@NotNull default Row $field() { return $arg1(); }
}
public /*sealed*/ interface RowOverlaps
extends
Condition,
UOperator2
/*permits
RowOverlaps*/
{}
public /*sealed*/ interface SelectIsNull
extends
Condition,
UOperator1