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

org.jooq.impl.QOM 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
 * Apache-2.0 license and offer limited warranties, support, maintenance, and
 * commercial database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package org.jooq.impl;

import static java.util.Collections.unmodifiableCollection;
import static java.util.Collections.unmodifiableList;
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.List;
import java.util.UUID;
import java.util.function.Predicate;

// ...
import org.jooq.Catalog;
import org.jooq.Collation;
import org.jooq.Comment;
import org.jooq.CommonTableExpression;
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.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.JSONEntry;
import org.jooq.Keyword;
// ...
import org.jooq.Name;
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.Sequence;
import org.jooq.Spatial;
import org.jooq.Statement;
import org.jooq.Table;
import org.jooq.TableElement;
import org.jooq.TableLike;
// ...
// ...
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(Function1)} 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 // ------------------------------------------------------------------------- // 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 /** * An unmodifiable {@link Collection} of {@link QueryPart} elements. */ public sealed interface UnmodifiableCollection extends org.jooq.QueryPart, java.util.Collection permits UnmodifiableList, QueryPartCollectionView {} /** * An unmodifiable {@link List} of {@link QueryPart} elements. */ public sealed interface UnmodifiableList extends UnmodifiableCollection, java.util.List permits QueryPartListView {} public /*sealed*/ interface With extends org.jooq.QueryPart /*permits WithImpl*/ { @NotNull UnmodifiableList> $commonTableExpressions(); boolean $recursive(); } // ------------------------------------------------------------------------- // XXX: Queries // ------------------------------------------------------------------------- public /*sealed*/ interface CreateType extends DDLQuery /*permits CreateTypeImpl*/ { @NotNull Name $name(); @NotNull UnmodifiableList> $values(); } public /*sealed*/ interface DropType extends DDLQuery /*permits DropTypeImpl*/ { @NotNull UnmodifiableList $names(); boolean $ifExists(); @Nullable Cascade $cascade(); } public /*sealed*/ interface CreateView extends DDLQuery /*permits CreateViewImpl*/ { boolean $ifNotExists(); boolean $orReplace(); @NotNull Table $view(); @NotNull UnmodifiableList> $fields(); @NotNull ResultQuery $query(); } // ------------------------------------------------------------------------- // XXX: Schema // ------------------------------------------------------------------------- public interface PrimaryKey extends Constraint { @NotNull UnmodifiableList> $fields(); } public interface UniqueKey extends Constraint { @NotNull UnmodifiableList> $fields(); } public interface ForeignKey extends Constraint { @NotNull UnmodifiableList> $fields(); @NotNull Constraint $references(); } public interface Check extends Constraint { @NotNull Condition $condition(); } // ------------------------------------------------------------------------- // XXX: Statements // ------------------------------------------------------------------------- public interface NullStatement extends Statement {} // ------------------------------------------------------------------------- // XXX: Tables // ------------------------------------------------------------------------- public interface TableAlias extends Table { @NotNull Table $table(); @NotNull Name $alias(); // TODO [#12425] Reuse MDerivedColumnList } public interface Dual extends Table, UEmpty {} public interface Lateral extends Table, UOperator1, Table> {} public interface DerivedTable extends Table, UOperator1, Table> {} public interface Values extends Table, UOperator1, Table> {} public interface DataChangeDeltaTable extends Table { @NotNull ResultOption $resultOption(); @NotNull DMLQuery $query(); } public interface RowsFrom extends Table { @NotNull UnmodifiableList> $tables(); } public interface GenerateSeries extends Table>, UOperator3, Field, Field, Table>> { @NotNull default Field $from() { return $arg1(); } @NotNull default Field $to() { return $arg2(); } @Nullable default Field $step() { return $arg3(); } } // ------------------------------------------------------------------------- // XXX: Conditions // ------------------------------------------------------------------------- public /*sealed*/ interface CombinedCondition extends Condition, UCommutativeOperator /*permits MAnd, MOr*/ {} public /*sealed*/ interface CompareCondition extends Condition, UOperator2, Field, Condition> /*permits MEq, MNe, MLt, MLe, MGt, MGe, MIsDistinctFrom, MIsNotDistinctFrom, MContains, MContainsIgnoreCase, MStartsWith, MStartsWithIgnoreCase, MEndsWith, MEndsWithIgnoreCase*/ {} public interface Between extends UOperator3, Field, Field, Condition> { boolean $symmetric(); } public /*sealed*/ interface InList extends Condition, UOperator2, UnmodifiableList>, Condition> /*permits InList*/ { @NotNull default Field $field() { return $arg1(); } @NotNull default UnmodifiableList> $list() { return $arg2(); } } public /*sealed*/ interface NotInList extends Condition, UOperator2, UnmodifiableList>, Condition> /*permits NotInList*/ { @NotNull default Field $field() { return $arg1(); } @NotNull default UnmodifiableList> $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, Condition> /*permits SelectIsNull*/ { @NotNull default Select $field() { return $arg1(); } } public /*sealed*/ interface SelectIsNotNull extends Condition, UOperator1, Condition> /*permits SelectIsNotNull*/ { @NotNull default Select $field() { return $arg1(); } } // ------------------------------------------------------------------------- // XXX: Rows // ------------------------------------------------------------------------- public /*sealed*/ interface RowAsField extends org.jooq.Field /*permits RowAsField*/ { @NotNull Row $row(); } public /*sealed*/ interface TableAsField extends org.jooq.Field /*permits TableAsField*/ { @NotNull Table $table(); } // ------------------------------------------------------------------------- // XXX: SelectFields, GroupFields and SortFields // ------------------------------------------------------------------------- // Can't seal these types yet because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=577872 public non-sealed interface EmptyGroupingSet extends GroupField, UEmpty /*permits org.jooq.impl.EmptyGroupingSet*/ {} public non-sealed interface Rollup extends GroupField, UOperator1, GroupField> /*permits Rollup*/ {} public non-sealed interface Cube extends GroupField, UOperator1, GroupField> /*permits Cube*/ {} public non-sealed interface GroupingSets extends GroupField, UOperator1>, GroupField> /*permits GroupingSets*/ {} // ------------------------------------------------------------------------- // XXX: Aggregate functions and window functions // ------------------------------------------------------------------------- public /*sealed*/ interface RatioToReport extends org.jooq.AggregateFunction /*permits RatioToReport*/ { @NotNull Field $field(); } public /*sealed*/ interface Mode extends org.jooq.AggregateFunction, UOperator1, org.jooq.AggregateFunction> /*permits Mode*/ { @NotNull default Field $field() { return $arg1(); } } public /*sealed*/ interface MultisetAgg extends org.jooq.AggregateFunction> /*permits MultisetAgg*/ { @NotNull Row $row(); } public /*sealed*/ interface ArrayAgg extends org.jooq.AggregateFunction, UOperator1, org.jooq.AggregateFunction> /*permits ArrayAgg*/ { @NotNull default Field $field() { return $arg1(); } boolean $distinct(); } public /*sealed*/ interface XMLAgg extends org.jooq.AggregateFunction, UOperator1, org.jooq.AggregateFunction> /*permits XMLAgg*/ { @NotNull default Field $field() { return $arg1(); } } public /*sealed*/ interface JSONArrayAgg extends org.jooq.AggregateFunction, UOperator1, org.jooq.AggregateFunction> /*permits JSONArrayAgg*/ { @NotNull default Field $field() { return $arg1(); } @Nullable JSONOnNull $onNull(); @Nullable DataType $returning(); } public /*sealed*/ interface JSONObjectAgg extends org.jooq.AggregateFunction, UOperator1, org.jooq.AggregateFunction> /*permits JSONObjectAgg*/ { @NotNull default JSONEntry $entry() { return $arg1(); } @Nullable JSONOnNull $onNull(); @Nullable DataType $returning(); } public /*sealed*/ interface CountTable extends org.jooq.AggregateFunction /*permits CountTable*/ { @NotNull Table $table(); boolean $distinct(); } public interface WindowFunction extends org.jooq.Field { @Nullable WindowSpecification $windowSpecification(); @Nullable WindowDefinition $windowDefinition(); } public /*sealed*/ interface RowNumber extends WindowFunction /*permits RowNumber*/ {} public /*sealed*/ interface Rank extends WindowFunction /*permits Rank*/ {} public /*sealed*/ interface DenseRank extends WindowFunction /*permits DenseRank*/ {} public /*sealed*/ interface PercentRank extends WindowFunction /*permits PercentRank*/ {} public /*sealed*/ interface CumeDist extends WindowFunction /*permits CumeDist*/ {} public /*sealed*/ interface Ntile extends WindowFunction /*permits Ntile*/ { @NotNull Field $tiles(); } public /*sealed*/ interface Lead extends WindowFunction /*permits Lead*/ { @NotNull Field $field(); @Nullable Field $offset(); @Nullable Field $defaultValue(); @Nullable NullTreatment $nullTreatment(); } public /*sealed*/ interface Lag extends WindowFunction /*permits Lag*/ { @NotNull Field $field(); @Nullable Field $offset(); @Nullable Field $defaultValue(); @Nullable NullTreatment $nullTreatment(); } public /*sealed*/ interface FirstValue extends WindowFunction /*permits FirstValue*/ { @NotNull Field $field(); @Nullable NullTreatment $nullTreatment(); } public /*sealed*/ interface LastValue extends WindowFunction /*permits LastValue*/ { @NotNull Field $field(); @Nullable NullTreatment $nullTreatment(); } public /*sealed*/ interface NthValue extends WindowFunction /*permits NthValue*/ { @NotNull Field $field(); @Nullable FromFirstOrLast $fromFirstOrLast(); @Nullable NullTreatment $nullTreatment(); } // ------------------------------------------------------------------------- // XXX: Fields // ------------------------------------------------------------------------- public /*sealed*/ interface FieldAlias extends Field /*permits FieldAlias*/ { @NotNull Field $field(); @NotNull Name $alias(); } public /*sealed*/ interface Function extends Field /*permits org.jooq.impl.Function, org.jooq.impl.Function1*/ { @NotNull UnmodifiableList> $args(); } public /*sealed*/ interface Cast extends Field /*permits Cast*/ { @NotNull Field $field(); } public /*sealed*/ interface Coerce extends Field /*permits Coerce*/ { @NotNull Field $field(); } public /*sealed*/ interface Default extends Field, UEmpty /*permits Default*/ {} public /*sealed*/ interface Collated extends Field /*permits Collated*/ { @NotNull Field $field(); @NotNull Collation $collation(); } public /*sealed*/ interface Array extends Field /*permits org.jooq.impl.Array*/ { @NotNull UnmodifiableList> $elements(); } public /*sealed*/ interface ArrayQuery extends Field /*permits ArrayQuery*/ { @NotNull Select> $select(); } public /*sealed*/ interface Multiset extends org.jooq.Field> /*permits Multiset*/ { @NotNull TableLike $table(); } public /*sealed*/ interface ScalarSubquery extends Field, UOperator1>, Field> /*permits ScalarSubquery*/ {} public /*sealed*/ interface Neg extends Field, UOperator1, Field> /*permits Neg*/ {} public /*sealed*/ interface Greatest extends Field, UOperator1>, Field> /*permits Greatest*/ {} public /*sealed*/ interface Least extends Field, UOperator1>, Field> /*permits Least*/ {} public /*sealed*/ interface Choose extends Field, UOperator2, UnmodifiableList>, Field> /*permits Choose*/ {} public /*sealed*/ interface FieldFunction extends Field, UOperator2, UnmodifiableList>, Field> /*permits FieldFunction*/ {} public /*sealed*/ interface Nvl2 extends Field, UOperator3, Field, Field, Field> /*permits Nvl2*/ { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $ifNotNull() { return $arg2(); } @NotNull default Field $ifIfNull() { return $arg3(); } } public /*sealed*/ interface Iif extends Field, UOperator3, Field, Field> /*permits Iif*/ { @NotNull default Condition $condition() { return $arg1(); } @NotNull default Field $ifTrue() { return $arg2(); } @NotNull default Field $ifFalse() { return $arg3(); } } public /*sealed*/ interface Coalesce extends Field, UOperator1>, Field> /*permits Coalesce*/ {} public /*sealed*/ interface Concat extends Field, UOperator1>, Field> /*permits Concat*/ {} public /*sealed*/ interface TimestampDiff extends Field, UOperator2, Field, Field> /*permits TimestampDiff*/ { @NotNull default Field $minuend() { return $arg1(); } @NotNull default Field $subtrahend() { return $arg2(); } } public /*sealed*/ interface Convert extends Field /*permits ConvertDateTime*/ { @NotNull Field $field(); int $style(); } public /*sealed*/ interface CurrentDate extends Field, UEmpty /*permits CurrentDate*/ {} public /*sealed*/ interface CurrentTime extends Field, UEmpty /*permits CurrentTime*/ {} public /*sealed*/ interface CurrentTimestamp extends Field, UEmpty /*permits CurrentTimestamp*/ {} public /*sealed*/ interface XMLQuery extends Field /*permits XMLQuery*/ { @NotNull Field $xpath(); @NotNull Field $passing(); @Nullable XMLPassingMechanism $passingMechanism(); } public /*sealed*/ interface XMLElement extends Field /*permits XMLElement*/ { @NotNull Name $elementName(); @NotNull XMLAttributes $attributes(); @NotNull UnmodifiableList> $content(); } public /*sealed*/ interface XMLExists extends Condition /*permits XMLExists*/ { @NotNull Field $xpath(); @NotNull Field $passing(); @Nullable XMLPassingMechanism $passingMechanism(); } public /*sealed*/ interface XMLParse extends Field /*permits XMLParse*/ { @NotNull Field $content(); @NotNull DocumentOrContent $documentOrContent(); } /** * The ALTER DATABASE statement. */ public /*sealed*/ interface AlterDatabase extends DDLQuery //permits // AlterDatabaseImpl { @NotNull Catalog $database(); boolean $ifExists(); @NotNull Catalog $renameTo(); @NotNull AlterDatabase $database(Catalog database); @NotNull AlterDatabase $ifExists(boolean ifExists); @NotNull AlterDatabase $renameTo(Catalog renameTo); } /** * The ALTER DOMAIN statement. */ public /*sealed*/ interface AlterDomain extends DDLQuery //permits // AlterDomainImpl { @NotNull Domain $domain(); boolean $ifExists(); @Nullable Constraint $addConstraint(); @Nullable Constraint $dropConstraint(); boolean $dropConstraintIfExists(); @Nullable Domain $renameTo(); @Nullable Constraint $renameConstraint(); boolean $renameConstraintIfExists(); @Nullable Field $setDefault(); boolean $dropDefault(); boolean $setNotNull(); boolean $dropNotNull(); @Nullable Cascade $cascade(); @Nullable Constraint $renameConstraintTo(); @NotNull AlterDomain $domain(Domain domain); @NotNull AlterDomain $ifExists(boolean ifExists); @NotNull AlterDomain $addConstraint(Constraint addConstraint); @NotNull AlterDomain $dropConstraint(Constraint dropConstraint); @NotNull AlterDomain $dropConstraintIfExists(boolean dropConstraintIfExists); @NotNull AlterDomain $renameTo(Domain renameTo); @NotNull AlterDomain $renameConstraint(Constraint renameConstraint); @NotNull AlterDomain $renameConstraintIfExists(boolean renameConstraintIfExists); @NotNull AlterDomain $setDefault(Field setDefault); @NotNull AlterDomain $dropDefault(boolean dropDefault); @NotNull AlterDomain $setNotNull(boolean setNotNull); @NotNull AlterDomain $dropNotNull(boolean dropNotNull); @NotNull AlterDomain $cascade(Cascade cascade); @NotNull AlterDomain $renameConstraintTo(Constraint renameConstraintTo); } /** * The ALTER INDEX statement. */ public /*sealed*/ interface AlterIndex extends DDLQuery //permits // AlterIndexImpl { @NotNull Index $index(); boolean $ifExists(); @Nullable Table $on(); @NotNull Index $renameTo(); @NotNull AlterIndex $index(Index index); @NotNull AlterIndex $ifExists(boolean ifExists); @NotNull AlterIndex $on(Table on); @NotNull AlterIndex $renameTo(Index renameTo); } /** * The ALTER SCHEMA statement. */ public /*sealed*/ interface AlterSchema extends DDLQuery //permits // AlterSchemaImpl { @NotNull Schema $schema(); boolean $ifExists(); @NotNull Schema $renameTo(); @NotNull AlterSchema $schema(Schema schema); @NotNull AlterSchema $ifExists(boolean ifExists); @NotNull AlterSchema $renameTo(Schema renameTo); } /** * The ALTER SEQUENCE statement. */ public /*sealed*/ interface AlterSequence extends DDLQuery //permits // AlterSequenceImpl { @NotNull Sequence $sequence(); boolean $ifExists(); @Nullable Sequence $renameTo(); boolean $restart(); @Nullable Field $restartWith(); @Nullable Field $startWith(); @Nullable Field $incrementBy(); @Nullable Field $minvalue(); boolean $noMinvalue(); @Nullable Field $maxvalue(); boolean $noMaxvalue(); @Nullable CycleOption $cycle(); @Nullable Field $cache(); boolean $noCache(); @NotNull AlterSequence $sequence(Sequence sequence); @NotNull AlterSequence $ifExists(boolean ifExists); @NotNull AlterSequence $renameTo(Sequence renameTo); @NotNull AlterSequence $restart(boolean restart); @NotNull AlterSequence $restartWith(Field restartWith); @NotNull AlterSequence $startWith(Field startWith); @NotNull AlterSequence $incrementBy(Field incrementBy); @NotNull AlterSequence $minvalue(Field minvalue); @NotNull AlterSequence $noMinvalue(boolean noMinvalue); @NotNull AlterSequence $maxvalue(Field maxvalue); @NotNull AlterSequence $noMaxvalue(boolean noMaxvalue); @NotNull AlterSequence $cycle(CycleOption cycle); @NotNull AlterSequence $cache(Field cache); @NotNull AlterSequence $noCache(boolean noCache); } /** * The ALTER TYPE statement. */ public /*sealed*/ interface AlterType extends DDLQuery //permits // AlterTypeImpl { @NotNull Name $type(); @Nullable Name $renameTo(); @Nullable Schema $setSchema(); @Nullable Field $addValue(); @Nullable Field $renameValue(); @Nullable Field $renameValueTo(); @NotNull AlterType $type(Name type); @NotNull AlterType $renameTo(Name renameTo); @NotNull AlterType $setSchema(Schema setSchema); @NotNull AlterType $addValue(Field addValue); @NotNull AlterType $renameValue(Field renameValue); @NotNull AlterType $renameValueTo(Field renameValueTo); } /** * The ALTER VIEW statement. */ public /*sealed*/ interface AlterView extends DDLQuery //permits // AlterViewImpl { @NotNull Table $view(); boolean $ifExists(); @Nullable Comment $comment(); @Nullable Table $renameTo(); @NotNull AlterView $view(Table view); @NotNull AlterView $ifExists(boolean ifExists); @NotNull AlterView $comment(Comment comment); @NotNull AlterView $renameTo(Table renameTo); } /** * The COMMENT ON TABLE statement. */ public /*sealed*/ interface CommentOn extends DDLQuery //permits // CommentOnImpl { @Nullable Table $table(); boolean $isView(); @Nullable Field $field(); @NotNull Comment $comment(); @NotNull CommentOn $table(Table table); @NotNull CommentOn $isView(boolean isView); @NotNull CommentOn $field(Field field); @NotNull CommentOn $comment(Comment comment); } /** * The CREATE DATABASE statement. */ public /*sealed*/ interface CreateDatabase extends DDLQuery //permits // CreateDatabaseImpl { @NotNull Catalog $database(); boolean $ifNotExists(); @NotNull CreateDatabase $database(Catalog database); @NotNull CreateDatabase $ifNotExists(boolean ifNotExists); } /** * The CREATE DOMAIN statement. */ public /*sealed*/ interface CreateDomain extends DDLQuery //permits // CreateDomainImpl { @NotNull Domain $domain(); boolean $ifNotExists(); @NotNull DataType $dataType(); @Nullable Field $default_(); @NotNull UnmodifiableList $constraints(); @NotNull CreateDomain $domain(Domain domain); @NotNull CreateDomain $ifNotExists(boolean ifNotExists); @NotNull CreateDomain $dataType(DataType dataType); @NotNull CreateDomain $default_(Field default_); @NotNull CreateDomain $constraints(Collection constraints); } /** * The CREATE INDEX statement. */ public /*sealed*/ interface CreateIndex extends DDLQuery //permits // CreateIndexImpl { boolean $unique(); @Nullable Index $index(); boolean $ifNotExists(); @Nullable Table $table(); @NotNull UnmodifiableList> $on(); @NotNull UnmodifiableList> $include(); @Nullable Condition $where(); boolean $excludeNullKeys(); @NotNull CreateIndex $unique(boolean unique); @NotNull CreateIndex $index(Index index); @NotNull CreateIndex $ifNotExists(boolean ifNotExists); @NotNull CreateIndex $table(Table table); @NotNull CreateIndex $on(Collection> on); @NotNull CreateIndex $include(Collection> include); @NotNull CreateIndex $where(Condition where); @NotNull CreateIndex $excludeNullKeys(boolean excludeNullKeys); } /** * The CREATE TABLE statement. */ public /*sealed*/ interface CreateTable extends DDLQuery //permits // CreateTableImpl { @NotNull Table $table(); boolean $temporary(); boolean $ifNotExists(); @NotNull UnmodifiableList $tableElements(); @Nullable Select $select(); @Nullable WithOrWithoutData $withData(); @Nullable TableCommitAction $onCommit(); @Nullable Comment $comment(); @Nullable SQL $storage(); @NotNull CreateTable $table(Table table); @NotNull CreateTable $temporary(boolean temporary); @NotNull CreateTable $ifNotExists(boolean ifNotExists); @NotNull CreateTable $tableElements(Collection tableElements); @NotNull CreateTable $select(Select select); @NotNull CreateTable $withData(WithOrWithoutData withData); @NotNull CreateTable $onCommit(TableCommitAction onCommit); @NotNull CreateTable $comment(Comment comment); @NotNull CreateTable $storage(SQL storage); } /** * The CREATE SCHEMA statement. */ public /*sealed*/ interface CreateSchema extends DDLQuery //permits // CreateSchemaImpl { @NotNull Schema $schema(); boolean $ifNotExists(); @NotNull CreateSchema $schema(Schema schema); @NotNull CreateSchema $ifNotExists(boolean ifNotExists); } /** * The CREATE SEQUENCE statement. */ public /*sealed*/ interface CreateSequence extends DDLQuery //permits // CreateSequenceImpl { @NotNull Sequence $sequence(); boolean $ifNotExists(); @Nullable Field $startWith(); @Nullable Field $incrementBy(); @Nullable Field $minvalue(); boolean $noMinvalue(); @Nullable Field $maxvalue(); boolean $noMaxvalue(); @Nullable CycleOption $cycle(); @Nullable Field $cache(); boolean $noCache(); @NotNull CreateSequence $sequence(Sequence sequence); @NotNull CreateSequence $ifNotExists(boolean ifNotExists); @NotNull CreateSequence $startWith(Field startWith); @NotNull CreateSequence $incrementBy(Field incrementBy); @NotNull CreateSequence $minvalue(Field minvalue); @NotNull CreateSequence $noMinvalue(boolean noMinvalue); @NotNull CreateSequence $maxvalue(Field maxvalue); @NotNull CreateSequence $noMaxvalue(boolean noMaxvalue); @NotNull CreateSequence $cycle(CycleOption cycle); @NotNull CreateSequence $cache(Field cache); @NotNull CreateSequence $noCache(boolean noCache); } /** * The DROP DATABASE statement. */ public /*sealed*/ interface DropDatabase extends DDLQuery //permits // DropDatabaseImpl { @NotNull Catalog $database(); boolean $ifExists(); @NotNull DropDatabase $database(Catalog database); @NotNull DropDatabase $ifExists(boolean ifExists); } /** * The DROP DOMAIN statement. */ public /*sealed*/ interface DropDomain extends DDLQuery //permits // DropDomainImpl { @NotNull Domain $domain(); boolean $ifExists(); @Nullable Cascade $cascade(); @NotNull DropDomain $domain(Domain domain); @NotNull DropDomain $ifExists(boolean ifExists); @NotNull DropDomain $cascade(Cascade cascade); } /** * The DROP INDEX statement. */ public /*sealed*/ interface DropIndex extends DDLQuery //permits // DropIndexImpl { @NotNull Index $index(); boolean $ifExists(); @Nullable Table $on(); @Nullable Cascade $cascade(); @NotNull DropIndex $index(Index index); @NotNull DropIndex $ifExists(boolean ifExists); @NotNull DropIndex $on(Table on); @NotNull DropIndex $cascade(Cascade cascade); } /** * The DROP SCHEMA statement. */ public /*sealed*/ interface DropSchema extends DDLQuery //permits // DropSchemaImpl { @NotNull Schema $schema(); boolean $ifExists(); @Nullable Cascade $cascade(); @NotNull DropSchema $schema(Schema schema); @NotNull DropSchema $ifExists(boolean ifExists); @NotNull DropSchema $cascade(Cascade cascade); } /** * The DROP SEQUENCE statement. */ public /*sealed*/ interface DropSequence extends DDLQuery //permits // DropSequenceImpl { @NotNull Sequence $sequence(); boolean $ifExists(); @NotNull DropSequence $sequence(Sequence sequence); @NotNull DropSequence $ifExists(boolean ifExists); } /** * The DROP TABLE statement. */ public /*sealed*/ interface DropTable extends DDLQuery //permits // DropTableImpl { boolean $temporary(); @NotNull Table $table(); boolean $ifExists(); @Nullable Cascade $cascade(); @NotNull DropTable $temporary(boolean temporary); @NotNull DropTable $table(Table table); @NotNull DropTable $ifExists(boolean ifExists); @NotNull DropTable $cascade(Cascade cascade); } /** * The DROP VIEW statement. */ public /*sealed*/ interface DropView extends DDLQuery //permits // DropViewImpl { @NotNull Table $view(); boolean $ifExists(); @NotNull DropView $view(Table view); @NotNull DropView $ifExists(boolean ifExists); } /** * The GRANT statement. */ public /*sealed*/ interface Grant extends DDLQuery //permits // GrantImpl { @NotNull UnmodifiableList $privileges(); @NotNull Table $on(); @Nullable Role $to(); boolean $toPublic(); boolean $withGrantOption(); @NotNull Grant $privileges(Collection privileges); @NotNull Grant $on(Table on); @NotNull Grant $to(Role to); @NotNull Grant $toPublic(boolean toPublic); @NotNull Grant $withGrantOption(boolean withGrantOption); } /** * The REVOKE statement. */ public /*sealed*/ interface Revoke extends DDLQuery //permits // RevokeImpl { @NotNull UnmodifiableList $privileges(); boolean $grantOptionFor(); @NotNull Table $on(); @Nullable Role $from(); boolean $fromPublic(); @NotNull Revoke $privileges(Collection privileges); @NotNull Revoke $grantOptionFor(boolean grantOptionFor); @NotNull Revoke $on(Table on); @NotNull Revoke $from(Role from); @NotNull Revoke $fromPublic(boolean fromPublic); } /** * The SET statement. *

* Set a vendor specific session configuration to a new value. */ public /*sealed*/ interface SetCommand extends org.jooq.RowCountQuery //permits // SetCommand { @NotNull Name $name(); @NotNull Param $value(); boolean $local(); @NotNull SetCommand $name(Name name); @NotNull SetCommand $value(Param value); @NotNull SetCommand $local(boolean local); } /** * The SET CATALOG statement. *

* Set the current catalog to a new value. */ public /*sealed*/ interface SetCatalog extends org.jooq.RowCountQuery //permits // SetCatalog { @NotNull Catalog $catalog(); @NotNull SetCatalog $catalog(Catalog catalog); } /** * The SET SCHEMA statement. *

* Set the current schema to a new value. */ public /*sealed*/ interface SetSchema extends org.jooq.RowCountQuery //permits // SetSchema { @NotNull Schema $schema(); @NotNull SetSchema $schema(Schema schema); } /** * The TRUNCATE statement. */ public /*sealed*/ interface Truncate extends DDLQuery //permits // TruncateImpl { @NotNull Table $table(); @Nullable IdentityRestartOption $restartIdentity(); @Nullable Cascade $cascade(); @NotNull Truncate $table(Table table); @NotNull Truncate $restartIdentity(IdentityRestartOption restartIdentity); @NotNull Truncate $cascade(Cascade cascade); } /** * The AND operator. */ public /*sealed*/ interface And extends CombinedCondition //permits // And {} /** * The EQ operator. */ public /*sealed*/ interface TableEq extends org.jooq.Condition, UCommutativeOperator, Condition> //permits // TableEq {} /** * The EQ operator. */ public /*sealed*/ interface Eq extends UCommutativeOperator, Condition>, CompareCondition //permits // Eq {} /** * The EXISTS function. */ public /*sealed*/ interface Exists extends org.jooq.Condition //permits // Exists { @NotNull Select $query(); @NotNull Exists $query(Select query); } /** * The GE operator. */ public /*sealed*/ interface Ge extends UConvertibleOperator, Condition>, CompareCondition //permits // Ge { @Override default Condition $converse() { return $arg2().le($arg1()); } } /** * The GT operator. */ public /*sealed*/ interface Gt extends UConvertibleOperator, Condition>, CompareCondition //permits // Gt { @Override default Condition $converse() { return $arg2().lt($arg1()); } } /** * The IN operator. *

* The subquery must return exactly one field. This is not checked * by jOOQ and will result in syntax errors in the database, if not used * correctly. */ public /*sealed*/ interface In extends org.jooq.Condition, UOperator2, Select>, Condition> //permits // In {} /** * The IS DISTINCT FROM operator. *

* The DISTINCT predicate allows for creating NULL safe comparisons where the two operands * are tested for non-equality */ public /*sealed*/ interface IsDistinctFrom extends UCommutativeOperator, Condition>, CompareCondition //permits // IsDistinctFrom {} /** * The IS NULL operator. */ public /*sealed*/ interface IsNull extends org.jooq.Condition, UOperator1, Condition> //permits // IsNull { @NotNull default Field $field() { return $arg1(); } } /** * The IS NOT DISTINCT FROM operator. *

* The NOT DISTINCT predicate allows for creating NULL safe comparisons where the two * operands are tested for equality */ public /*sealed*/ interface IsNotDistinctFrom extends UCommutativeOperator, Condition>, CompareCondition //permits // IsNotDistinctFrom {} /** * The IS NOT NULL operator. */ public /*sealed*/ interface IsNotNull extends org.jooq.Condition, UOperator1, Condition> //permits // IsNotNull { @NotNull default Field $field() { return $arg1(); } } /** * The LE operator. */ public /*sealed*/ interface Le extends UConvertibleOperator, Condition>, CompareCondition //permits // Le { @Override default Condition $converse() { return $arg2().ge($arg1()); } } /** * The LIKE operator. */ public /*sealed*/ interface Like extends Condition, UOperator3, Field, Character, Condition> //permits // Like { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The LIKE IGNORE CASE operator. *

* Create a condition to case-insensitively pattern-check this field against * a value. *

* This translates to this ilike value in * {@link SQLDialect#POSTGRES}, or to * lower(this) like lower(value) in all other dialects. */ public /*sealed*/ interface LikeIgnoreCase extends Condition, UOperator3, Field, Character, Condition> //permits // LikeIgnoreCase { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The LT operator. */ public /*sealed*/ interface Lt extends UConvertibleOperator, Condition>, CompareCondition //permits // Lt { @Override default Condition $converse() { return $arg2().gt($arg1()); } } /** * The NE operator. */ public /*sealed*/ interface TableNe extends org.jooq.Condition, UCommutativeOperator, Condition> //permits // TableNe {} /** * The NE operator. */ public /*sealed*/ interface Ne extends UCommutativeOperator, Condition>, CompareCondition //permits // Ne {} /** * The NOT operator. */ public /*sealed*/ interface Not extends org.jooq.Condition, UOperator1 //permits // Not { @NotNull default Condition $condition() { return $arg1(); } } /** * The NOT operator. */ public /*sealed*/ interface NotField extends org.jooq.Field, UOperator1, Field> //permits // NotField { @NotNull default Field $field() { return $arg1(); } } /** * The NOT IN operator. *

* The subquery must return exactly one field. This is not checked * by jOOQ and will result in syntax errors in the database, if not used * correctly. *

* If any of the passed values is NULL, then the * condition will be NULL (or false, depending on * the dialect) as well. This is standard SQL behaviour. */ public /*sealed*/ interface NotIn extends org.jooq.Condition, UOperator2, Select>, Condition> //permits // NotIn {} /** * The NOT LIKE operator. */ public /*sealed*/ interface NotLike extends Condition, UOperator3, Field, Character, Condition> //permits // NotLike { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The NOT LIKE IGNORE CASE operator. *

* Create a condition to case-insensitively pattern-check this field against * a value. *

* This translates to this not ilike value in * {@link SQLDialect#POSTGRES}, or to * lower(this) not like lower(value) in all other dialects. */ public /*sealed*/ interface NotLikeIgnoreCase extends Condition, UOperator3, Field, Character, Condition> //permits // NotLikeIgnoreCase { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The NOT SIMILAR TO operator. */ public /*sealed*/ interface NotSimilarTo extends Condition, UOperator3, Field, Character, Condition> //permits // NotSimilarTo { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The OR operator. */ public /*sealed*/ interface Or extends CombinedCondition //permits // Or {} /** * The SIMILAR TO operator. */ public /*sealed*/ interface SimilarTo extends Condition, UOperator3, Field, Character, Condition> //permits // SimilarTo { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $pattern() { return $arg2(); } @Nullable default Character $escape() { return $arg3(); } } /** * The UNIQUE function. */ public /*sealed*/ interface Unique extends org.jooq.Condition //permits // Unique { @NotNull Select $query(); @NotNull Unique $query(Select query); } /** * The IS DOCUMENT operator. *

* Create a condition to check if this field contains XML data. */ public /*sealed*/ interface IsDocument extends org.jooq.Condition, UOperator1, Condition> //permits // IsDocument { @NotNull default Field $field() { return $arg1(); } } /** * The IS NOT DOCUMENT operator. *

* Create a condition to check if this field does not contain XML data. */ public /*sealed*/ interface IsNotDocument extends org.jooq.Condition, UOperator1, Condition> //permits // IsNotDocument { @NotNull default Field $field() { return $arg1(); } } /** * The IS JSON operator. *

* Create a condition to check if this field contains JSON data. */ public /*sealed*/ interface IsJson extends org.jooq.Condition, UOperator1, Condition> //permits // IsJson { @NotNull default Field $field() { return $arg1(); } } /** * The IS NOT JSON operator. *

* Create a condition to check if this field does not contain JSON data. */ public /*sealed*/ interface IsNotJson extends org.jooq.Condition, UOperator1, Condition> //permits // IsNotJson { @NotNull default Field $field() { return $arg1(); } } /** * The EXCLUDED function. *

* Provide "EXCLUDED" qualification for a column for use in ON CONFLICT or ON DUPLICATE * KEY UPDATE. */ public /*sealed*/ interface Excluded extends org.jooq.Field //permits // Excluded { /** * The excluded field. */ @NotNull Field $field(); /** * The excluded field. */ @NotNull Excluded $field(Field field); } /** * The ROWID operator. *

* Get a table.rowid reference from this table. *

* A rowid value describes the physical location of a row on the disk, which * can be used as a replacement for a primary key in some situations - * especially within a query, e.g. to self-join a table: *

*


     * -- Emulating this MySQL statement...
     * DELETE FROM x ORDER BY x.y LIMIT 1
     *
     * -- ... in other databases
     * DELETE FROM x
     * WHERE x.rowid IN (
     *   SELECT x.rowid FROM x ORDER BY x.a LIMIT 1
     * )
     * 
*

* It is not recommended to use rowid values in client * applications as actual row identifiers as the database system may move a * row to a different physical location at any time, thus changing the rowid * value. In general, use primary keys, instead. */ public /*sealed*/ interface QualifiedRowid extends org.jooq.Field, UOperator1, Field> //permits // QualifiedRowid { @NotNull default Table $table() { return $arg1(); } } /** * The ABS function. */ public /*sealed*/ interface Abs extends org.jooq.Field //permits // Abs { @NotNull Field $value(); @NotNull Abs $value(Field value); } /** * The ACOS function. */ public /*sealed*/ interface Acos extends org.jooq.Field //permits // Acos { @NotNull Field $value(); @NotNull Acos $value(Field value); } /** * The ACOSH function. */ public /*sealed*/ interface Acosh extends org.jooq.Field //permits // Acosh { @NotNull Field $value(); @NotNull Acosh $value(Field value); } /** * The ACOTH function. */ public /*sealed*/ interface Acoth extends org.jooq.Field //permits // Acoth { @NotNull Field $value(); @NotNull Acoth $value(Field value); } /** * The ADD operator. */ public /*sealed*/ interface Add extends org.jooq.Field, UCommutativeOperator, Field> //permits // Add {} /** * The ASIN function. */ public /*sealed*/ interface Asin extends org.jooq.Field //permits // Asin { @NotNull Field $value(); @NotNull Asin $value(Field value); } /** * The ASINH function. */ public /*sealed*/ interface Asinh extends org.jooq.Field //permits // Asinh { @NotNull Field $value(); @NotNull Asinh $value(Field value); } /** * The ATAN function. */ public /*sealed*/ interface Atan extends org.jooq.Field //permits // Atan { @NotNull Field $value(); @NotNull Atan $value(Field value); } /** * The ATAN2 function. */ public /*sealed*/ interface Atan2 extends org.jooq.Field //permits // Atan2 { @NotNull Field $x(); @NotNull Field $y(); @NotNull Atan2 $x(Field x); @NotNull Atan2 $y(Field y); } /** * The ATANH function. */ public /*sealed*/ interface Atanh extends org.jooq.Field //permits // Atanh { @NotNull Field $value(); @NotNull Atanh $value(Field value); } /** * The BIT AND operator. */ public /*sealed*/ interface BitAnd extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitAnd {} /** * The BIT COUNT function. *

* Count the number of bits set in a number */ public /*sealed*/ interface BitCount extends org.jooq.Field //permits // BitCount { @NotNull Field $value(); @NotNull BitCount $value(Field value); } /** * The BIT NAND operator. */ public /*sealed*/ interface BitNand extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitNand {} /** * The BIT NOR operator. */ public /*sealed*/ interface BitNor extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitNor {} /** * The BIT NOT operator. */ public /*sealed*/ interface BitNot extends org.jooq.Field, UOperator1, Field> //permits // BitNot {} /** * The BIT OR operator. */ public /*sealed*/ interface BitOr extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitOr {} /** * The BIT X NOR operator. */ public /*sealed*/ interface BitXNor extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitXNor {} /** * The BIT XOR operator. */ public /*sealed*/ interface BitXor extends org.jooq.Field, UCommutativeOperator, Field> //permits // BitXor {} /** * The CEIL function. *

* Get the smallest integer value equal or greater to a value. */ public /*sealed*/ interface Ceil extends org.jooq.Field //permits // Ceil { @NotNull Field $value(); @NotNull Ceil $value(Field value); } /** * The COS function. */ public /*sealed*/ interface Cos extends org.jooq.Field //permits // Cos { @NotNull Field $value(); @NotNull Cos $value(Field value); } /** * The COSH function. */ public /*sealed*/ interface Cosh extends org.jooq.Field //permits // Cosh { @NotNull Field $value(); @NotNull Cosh $value(Field value); } /** * The COT function. */ public /*sealed*/ interface Cot extends org.jooq.Field //permits // Cot { @NotNull Field $value(); @NotNull Cot $value(Field value); } /** * The COTH function. */ public /*sealed*/ interface Coth extends org.jooq.Field //permits // Coth { @NotNull Field $value(); @NotNull Coth $value(Field value); } /** * The DEGREES function. *

* Turn a value in radians to degrees. */ public /*sealed*/ interface Degrees extends org.jooq.Field //permits // Degrees { /** * The value in radians. */ @NotNull Field $radians(); /** * The value in radians. */ @NotNull Degrees $radians(Field radians); } /** * The DIV operator. */ public /*sealed*/ interface Div extends org.jooq.Field, UOperator2, Field, Field> //permits // Div {} /** * The E function. *

* The E literal (Euler number). */ public /*sealed*/ interface Euler extends org.jooq.Field, UEmpty //permits // Euler {} /** * The EXP function. */ public /*sealed*/ interface Exp extends org.jooq.Field //permits // Exp { @NotNull Field $value(); @NotNull Exp $value(Field value); } /** * The FLOOR function. *

* Get the biggest integer value equal or less than a value. */ public /*sealed*/ interface Floor extends org.jooq.Field //permits // Floor { @NotNull Field $value(); @NotNull Floor $value(Field value); } /** * The LN function. *

* Get the natural logarithm of a value. */ public /*sealed*/ interface Ln extends org.jooq.Field //permits // Ln { @NotNull Field $value(); @NotNull Ln $value(Field value); } /** * The LOG function. *

* Get the logarithm of a value for a base. */ public /*sealed*/ interface Log extends org.jooq.Field //permits // Log { @NotNull Field $value(); @NotNull Field $base(); @NotNull Log $value(Field value); @NotNull Log $base(Field base); } /** * The LOG10 function. *

* Get the logarithm of a value for base 10. */ public /*sealed*/ interface Log10 extends org.jooq.Field //permits // Log10 { @NotNull Field $value(); @NotNull Log10 $value(Field value); } /** * The MOD operator. */ public /*sealed*/ interface Mod extends org.jooq.Field, UOperator2, Field, Field> //permits // Mod { @NotNull default Field $dividend() { return $arg1(); } @NotNull default Field $divisor() { return $arg2(); } } /** * The MUL operator. */ public /*sealed*/ interface Mul extends org.jooq.Field, UCommutativeOperator, Field> //permits // Mul {} /** * The PI function. *

* The π literal. */ public /*sealed*/ interface Pi extends org.jooq.Field, UEmpty //permits // Pi {} /** * The POWER operator. */ public /*sealed*/ interface Power extends org.jooq.Field, UOperator2, Field, Field> //permits // Power { @NotNull default Field $base() { return $arg1(); } @NotNull default Field $exponent() { return $arg2(); } } /** * The RADIANS function. *

* Turn a value in degrees to radians. */ public /*sealed*/ interface Radians extends org.jooq.Field //permits // Radians { /** * The value in degrees. */ @NotNull Field $degrees(); /** * The value in degrees. */ @NotNull Radians $degrees(Field degrees); } /** * The RAND function. *

* Get a random numeric value. */ public /*sealed*/ interface Rand extends org.jooq.Field, UEmpty //permits // Rand {} /** * The ROUND function. *

* Round a numeric value to the nearest decimal precision. */ public /*sealed*/ interface Round extends org.jooq.Field //permits // Round { /** * The number to be rounded. */ @NotNull Field $value(); /** * The decimals to round to. */ @Nullable Field $decimals(); /** * The number to be rounded. */ @NotNull Round $value(Field value); /** * The decimals to round to. */ @NotNull Round $decimals(Field decimals); } /** * The SHL operator. *

* Left shift all bits in a number */ public /*sealed*/ interface Shl extends org.jooq.Field, UOperator2, Field, Field> //permits // Shl { /** * The number whose bits to shift left. */ @NotNull default Field $value() { return $arg1(); } /** * The number of bits to shift. */ @NotNull default Field $count() { return $arg2(); } } /** * The SHR operator. *

* Right shift all bits in a number */ public /*sealed*/ interface Shr extends org.jooq.Field, UOperator2, Field, Field> //permits // Shr { /** * The number whose bits to shift right */ @NotNull default Field $value() { return $arg1(); } /** * The number of bits to shift. */ @NotNull default Field $count() { return $arg2(); } } /** * The SIGN function. *

* Get the sign of a number and return it as any of +1, 0, -1. */ public /*sealed*/ interface Sign extends org.jooq.Field //permits // Sign { @NotNull Field $value(); @NotNull Sign $value(Field value); } /** * The SIN function. */ public /*sealed*/ interface Sin extends org.jooq.Field //permits // Sin { @NotNull Field $value(); @NotNull Sin $value(Field value); } /** * The SINH function. */ public /*sealed*/ interface Sinh extends org.jooq.Field //permits // Sinh { @NotNull Field $value(); @NotNull Sinh $value(Field value); } /** * The SQRT function. */ public /*sealed*/ interface Sqrt extends org.jooq.Field //permits // Sqrt { @NotNull Field $value(); @NotNull Sqrt $value(Field value); } /** * The SQUARE function. */ public /*sealed*/ interface Square extends org.jooq.Field //permits // Square { @NotNull Field $value(); @NotNull Square $value(Field value); } /** * The SUB operator. */ public /*sealed*/ interface Sub extends org.jooq.Field, UOperator2, Field, Field> //permits // Sub {} /** * The TAN function. */ public /*sealed*/ interface Tan extends org.jooq.Field //permits // Tan { @NotNull Field $value(); @NotNull Tan $value(Field value); } /** * The TANH function. */ public /*sealed*/ interface Tanh extends org.jooq.Field //permits // Tanh { @NotNull Field $value(); @NotNull Tanh $value(Field value); } /** * The TAU function. *

* The τ literal, or π, in a better world. */ public /*sealed*/ interface Tau extends org.jooq.Field, UEmpty //permits // Tau {} /** * The TRUNC function. *

* Truncate a number to a given number of decimals. */ public /*sealed*/ interface Trunc extends org.jooq.Field //permits // Trunc { /** * The number to be truncated */ @NotNull Field $value(); /** * The decimals to truncate to. */ @NotNull Field $decimals(); /** * The number to be truncated */ @NotNull Trunc $value(Field value); /** * The decimals to truncate to. */ @NotNull Trunc $decimals(Field decimals); } /** * The WIDTH BUCKET function. *

* Divide a range into buckets of equal size. */ public /*sealed*/ interface WidthBucket extends org.jooq.Field //permits // WidthBucket { /** * The value to divide into the range. */ @NotNull Field $field(); /** * The lower bound of the range. */ @NotNull Field $low(); /** * The upper bound of the range. */ @NotNull Field $high(); /** * The number of buckets to produce. */ @NotNull Field $buckets(); /** * The value to divide into the range. */ @NotNull WidthBucket $field(Field field); /** * The lower bound of the range. */ @NotNull WidthBucket $low(Field low); /** * The upper bound of the range. */ @NotNull WidthBucket $high(Field high); /** * The number of buckets to produce. */ @NotNull WidthBucket $buckets(Field buckets); } /** * The ASCII function. *

* The ASCII value of a character. */ public /*sealed*/ interface Ascii extends org.jooq.Field //permits // Ascii { @NotNull Field $string(); @NotNull Ascii $string(Field string); } /** * The BIT LENGTH function. *

* The length of a string in bits. */ public /*sealed*/ interface BitLength extends org.jooq.Field //permits // BitLength { @NotNull Field $string(); @NotNull BitLength $string(Field string); } /** * The CHAR LENGTH function. *

* The length of a string in characters. */ public /*sealed*/ interface CharLength extends org.jooq.Field //permits // CharLength { @NotNull Field $string(); @NotNull CharLength $string(Field string); } /** * The CHR function. */ public /*sealed*/ interface Chr extends org.jooq.Field //permits // Chr { @NotNull Field $value(); @NotNull Chr $value(Field value); } /** * The CONTAINS operator. *

* Convenience method for {@link #like(String, char)} including proper * adding of wildcards and escaping. *

* SQL: this like ('%' || escape(value, '\') || '%') escape '\' *

* Note: This also works with numbers, for instance * val(1133).contains(13) *

* If you're using {@link SQLDialect#POSTGRES}, then you can use this method * also to express the "ARRAY contains" operator. For example:


     * // Use this expression
     * val(new Integer[] { 1, 2, 3 }).contains(new Integer[] { 1, 2 })
     *
     * // ... to render this SQL
     * ARRAY[1, 2, 3] @> ARRAY[1, 2]
     * 
*

* Note, this does not correspond to the Oracle Text CONTAINS() * function. Refer to {@link OracleDSL#contains(Field, String)} instead. */ public /*sealed*/ interface Contains extends CompareCondition //permits // Contains { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $content() { return $arg2(); } } /** * The CONTAINS IGNORE CASE operator. *

* Convenience method for {@link #likeIgnoreCase(String, char)} including * proper adding of wildcards and escaping. *

* This translates to * this ilike ('%' || escape(value, '\') || '%') escape '\' in * {@link SQLDialect#POSTGRES}, or to * lower(this) like lower(('%' || escape(value, '\') || '%') escape '\') * in all other dialects. */ public /*sealed*/ interface ContainsIgnoreCase extends CompareCondition //permits // ContainsIgnoreCase { @NotNull default Field $value() { return $arg1(); } @NotNull default Field $content() { return $arg2(); } } /** * The DIGITS function. */ public /*sealed*/ interface Digits extends org.jooq.Field //permits // Digits { @NotNull Field $value(); @NotNull Digits $value(Field value); } /** * The ENDS WITH operator. *

* Convenience method for {@link #like(String, char)} including proper * adding of wildcards and escaping. *

* SQL: this like ('%' || escape(value, '\')) escape '\' *

* Note: This also works with numbers, for instance * val(1133).endsWith(33) */ public /*sealed*/ interface EndsWith extends CompareCondition //permits // EndsWith { @NotNull default Field $string() { return $arg1(); } @NotNull default Field $suffix() { return $arg2(); } } /** * The ENDS WITH IGNORE CASE operator. *

* Convenience method for {@link #like(String, char)} including proper * adding of wildcards and escaping. *

* SQL: lower(this) like ('%' || lower(escape(value, '\'))) escape '\' *

* Note: This also works with numbers, for instance * val(1133).endsWithIgnoreCase(33) */ public /*sealed*/ interface EndsWithIgnoreCase extends CompareCondition //permits // EndsWithIgnoreCase { @NotNull default Field $string() { return $arg1(); } @NotNull default Field $suffix() { return $arg2(); } } /** * The LEFT function. *

* Get the left outermost characters from a string. */ public /*sealed*/ interface Left extends org.jooq.Field //permits // Left { /** * The string whose characters are extracted. */ @NotNull Field $string(); /** * The number of characters to extract from the string. */ @NotNull Field $length(); /** * The string whose characters are extracted. */ @NotNull Left $string(Field string); /** * The number of characters to extract from the string. */ @NotNull Left $length(Field length); } /** * The LOWER function. *

* Turn a string into lower case. */ public /*sealed*/ interface Lower extends org.jooq.Field //permits // Lower { @NotNull Field $string(); @NotNull Lower $string(Field string); } /** * The LPAD function. *

* Left-pad a string with a character (whitespace as default) for a number of times. */ public /*sealed*/ interface Lpad extends org.jooq.Field //permits // Lpad { /** * The string to be padded. */ @NotNull Field $string(); /** * The maximum length to pad the string to. */ @NotNull Field $length(); /** * The padding character, if different from whitespace */ @Nullable Field $character(); /** * The string to be padded. */ @NotNull Lpad $string(Field string); /** * The maximum length to pad the string to. */ @NotNull Lpad $length(Field length); /** * The padding character, if different from whitespace */ @NotNull Lpad $character(Field character); } /** * The LTRIM function. *

* Trim characters (whitespace as default) from the left side of a string. */ public /*sealed*/ interface Ltrim extends org.jooq.Field //permits // Ltrim { /** * The string to be trimmed. */ @NotNull Field $string(); /** * The characters to be trimmed. */ @Nullable Field $characters(); /** * The string to be trimmed. */ @NotNull Ltrim $string(Field string); /** * The characters to be trimmed. */ @NotNull Ltrim $characters(Field characters); } /** * The MD5 function. *

* Calculate an MD5 hash from a string. */ public /*sealed*/ interface Md5 extends org.jooq.Field //permits // Md5 { @NotNull Field $string(); @NotNull Md5 $string(Field string); } /** * The OCTET LENGTH function. *

* The length of a string in octets. */ public /*sealed*/ interface OctetLength extends org.jooq.Field //permits // OctetLength { @NotNull Field $string(); @NotNull OctetLength $string(Field string); } /** * The OVERLAY function. *

* Place a string on top of another string, replacing the original contents. */ public /*sealed*/ interface Overlay extends org.jooq.Field //permits // Overlay { /** * The original string on top of which the overlay is placed. */ @NotNull Field $in(); /** * The string that is being placed on top of the other string. */ @NotNull Field $placing(); /** * The start index (1-based) starting from where the overlay is placed. */ @NotNull Field $startIndex(); /** * The length in the original string that will be replaced, if different from the overlay length. */ @Nullable Field $length(); /** * The original string on top of which the overlay is placed. */ @NotNull Overlay $in(Field in); /** * The string that is being placed on top of the other string. */ @NotNull Overlay $placing(Field placing); /** * The start index (1-based) starting from where the overlay is placed. */ @NotNull Overlay $startIndex(Field startIndex); /** * The length in the original string that will be replaced, if different from the overlay length. */ @NotNull Overlay $length(Field length); } /** * The POSITION function. *

* Search the position (1-based) of a substring in another string. */ public /*sealed*/ interface Position extends org.jooq.Field //permits // Position { /** * The string in which to search the substring. */ @NotNull Field $in(); /** * The substring to search for. */ @NotNull Field $search(); /** * The start index (1-based) from which to start looking for the substring. */ @Nullable Field $startIndex(); /** * The string in which to search the substring. */ @NotNull Position $in(Field in); /** * The substring to search for. */ @NotNull Position $search(Field search); /** * The start index (1-based) from which to start looking for the substring. */ @NotNull Position $startIndex(Field startIndex); } /** * The REPEAT function. *

* Repeat a string a number of times. */ public /*sealed*/ interface Repeat extends org.jooq.Field //permits // Repeat { /** * The string to be repeated. */ @NotNull Field $string(); /** * The number of times to repeat the string. */ @NotNull Field $count(); /** * The string to be repeated. */ @NotNull Repeat $string(Field string); /** * The number of times to repeat the string. */ @NotNull Repeat $count(Field count); } /** * The REPLACE function. *

* Replace all occurrences of a substring in another string. */ public /*sealed*/ interface Replace extends org.jooq.Field //permits // Replace { /** * The string in which to replace contents. */ @NotNull Field $string(); /** * The substring to search for. */ @NotNull Field $search(); /** * The replacement for each substring, if not empty. */ @Nullable Field $replace(); /** * The string in which to replace contents. */ @NotNull Replace $string(Field string); /** * The substring to search for. */ @NotNull Replace $search(Field search); /** * The replacement for each substring, if not empty. */ @NotNull Replace $replace(Field replace); } /** * The REVERSE function. *

* Reverse a string. */ public /*sealed*/ interface Reverse extends org.jooq.Field //permits // Reverse { @NotNull Field $string(); @NotNull Reverse $string(Field string); } /** * The RIGHT function. *

* Get the right outermost characters from a string. */ public /*sealed*/ interface Right extends org.jooq.Field //permits // Right { /** * The string whose characters are extracted. */ @NotNull Field $string(); /** * The number of characters to extract from the string. */ @NotNull Field $length(); /** * The string whose characters are extracted. */ @NotNull Right $string(Field string); /** * The number of characters to extract from the string. */ @NotNull Right $length(Field length); } /** * The RPAD function. *

* Right-pad a string with a character (whitespace as default) for a number of times. */ public /*sealed*/ interface Rpad extends org.jooq.Field //permits // Rpad { /** * The string to be padded. */ @NotNull Field $string(); /** * The maximum length to pad the string to. */ @NotNull Field $length(); /** * The padding character, if different from whitespace */ @Nullable Field $character(); /** * The string to be padded. */ @NotNull Rpad $string(Field string); /** * The maximum length to pad the string to. */ @NotNull Rpad $length(Field length); /** * The padding character, if different from whitespace */ @NotNull Rpad $character(Field character); } /** * The RTRIM function. *

* Trim characters (whitespace as default) from the right side of a string. */ public /*sealed*/ interface Rtrim extends org.jooq.Field //permits // Rtrim { /** * The string to be trimmed. */ @NotNull Field $string(); /** * The characters to be trimmed. */ @Nullable Field $characters(); /** * The string to be trimmed. */ @NotNull Rtrim $string(Field string); /** * The characters to be trimmed. */ @NotNull Rtrim $characters(Field characters); } /** * The SPACE function. *

* Get a string of spaces of a given length. */ public /*sealed*/ interface Space extends org.jooq.Field //permits // Space { /** * The number of spaces to produce. */ @NotNull Field $count(); /** * The number of spaces to produce. */ @NotNull Space $count(Field count); } /** * The SPLIT PART function. *

* Split a string into tokens, and retrieve the nth token. */ public /*sealed*/ interface SplitPart extends org.jooq.Field //permits // SplitPart { /** * The string to be split into parts. */ @NotNull Field $string(); /** * The delimiter used for splitting. */ @NotNull Field $delimiter(); /** * The token number (1-based). */ @NotNull Field $n(); /** * The string to be split into parts. */ @NotNull SplitPart $string(Field string); /** * The delimiter used for splitting. */ @NotNull SplitPart $delimiter(Field delimiter); /** * The token number (1-based). */ @NotNull SplitPart $n(Field n); } /** * The STARTS WITH operator. *

* Convenience method for {@link #like(String, char)} including proper * adding of wildcards and escaping. *

* SQL: this like (escape(value, '\') || '%') escape '\' *

* Note: This also works with numbers, for instance * val(1133).startsWith(11) */ public /*sealed*/ interface StartsWith extends CompareCondition //permits // StartsWith { @NotNull default Field $string() { return $arg1(); } @NotNull default Field $prefix() { return $arg2(); } } /** * The STARTS WITH IGNORE CASE operator. *

* Convenience method for {@link #like(String, char)} including proper * adding of wildcards and escaping. *

* SQL: lower(this) like (lower(escape(value, '\')) || '%') escape '\' *

* Note: This also works with numbers, for instance * val(1133).startsWithIgnoreCase(11) */ public /*sealed*/ interface StartsWithIgnoreCase extends CompareCondition //permits // StartsWithIgnoreCase { @NotNull default Field $string() { return $arg1(); } @NotNull default Field $prefix() { return $arg2(); } } /** * The SUBSTRING function. *

* Get a substring of a string, from a given position. */ public /*sealed*/ interface Substring extends org.jooq.Field //permits // Substring { /** * The string from which to get the substring. */ @NotNull Field $string(); /** * The position (1-based) from which to get the substring. */ @NotNull Field $startingPosition(); /** * The maximum length of the substring. */ @Nullable Field $length(); /** * The string from which to get the substring. */ @NotNull Substring $string(Field string); /** * The position (1-based) from which to get the substring. */ @NotNull Substring $startingPosition(Field startingPosition); /** * The maximum length of the substring. */ @NotNull Substring $length(Field length); } /** * The SUBSTRING INDEX function. *

* Get a substring of a string, from the beginning until the nth occurrence of a substring. */ public /*sealed*/ interface SubstringIndex extends org.jooq.Field //permits // SubstringIndex { /** * The string from which to get the substring. */ @NotNull Field $string(); /** * The delimiter. */ @NotNull Field $delimiter(); /** * The number of occurrences of the delimiter. */ @NotNull Field $n(); /** * The string from which to get the substring. */ @NotNull SubstringIndex $string(Field string); /** * The delimiter. */ @NotNull SubstringIndex $delimiter(Field delimiter); /** * The number of occurrences of the delimiter. */ @NotNull SubstringIndex $n(Field n); } /** * The TO CHAR function. *

* Format an arbitrary value as a string. */ public /*sealed*/ interface ToChar extends org.jooq.Field //permits // ToChar { /** * The value to be formatted. */ @NotNull Field $value(); /** * The vendor-specific formatting string. */ @Nullable Field $formatMask(); /** * The value to be formatted. */ @NotNull ToChar $value(Field value); /** * The vendor-specific formatting string. */ @NotNull ToChar $formatMask(Field formatMask); } /** * The TO DATE function. *

* Parse a string-formatted date value to a date. */ public /*sealed*/ interface ToDate extends org.jooq.Field //permits // ToDate { /** * The formatted DATE value. */ @NotNull Field $value(); /** * The vendor-specific formatting string. */ @NotNull Field $formatMask(); /** * The formatted DATE value. */ @NotNull ToDate $value(Field value); /** * The vendor-specific formatting string. */ @NotNull ToDate $formatMask(Field formatMask); } /** * The TO HEX function. *

* Format a number to its hex value. */ public /*sealed*/ interface ToHex extends org.jooq.Field //permits // ToHex { @NotNull Field $value(); @NotNull ToHex $value(Field value); } /** * The TO TIMESTAMP function. *

* Parse a string-formatted timestamp value to a timestamp. */ public /*sealed*/ interface ToTimestamp extends org.jooq.Field //permits // ToTimestamp { /** * The formatted TIMESTAMP value. */ @NotNull Field $value(); /** * The vendor-specific formatting string. */ @NotNull Field $formatMask(); /** * The formatted TIMESTAMP value. */ @NotNull ToTimestamp $value(Field value); /** * The vendor-specific formatting string. */ @NotNull ToTimestamp $formatMask(Field formatMask); } /** * The TRANSLATE function. *

* Translate a set of characters to another set of characters in a string. */ public /*sealed*/ interface Translate extends org.jooq.Field //permits // Translate { /** * The string to translate. */ @NotNull Field $string(); /** * The set of source characters. */ @NotNull Field $from(); /** * The set of target characters, matched with source characters by position. */ @NotNull Field $to(); /** * The string to translate. */ @NotNull Translate $string(Field string); /** * The set of source characters. */ @NotNull Translate $from(Field from); /** * The set of target characters, matched with source characters by position. */ @NotNull Translate $to(Field to); } /** * The TRIM function. *

* Trim characters (whitespace as default) from both sides of a string. */ public /*sealed*/ interface Trim extends org.jooq.Field //permits // Trim { /** * The string to be trimmed. */ @NotNull Field $string(); /** * The characters to be trimmed. */ @Nullable Field $characters(); /** * The string to be trimmed. */ @NotNull Trim $string(Field string); /** * The characters to be trimmed. */ @NotNull Trim $characters(Field characters); } /** * The UPPER function. *

* Turn a string into upper case. */ public /*sealed*/ interface Upper extends org.jooq.Field //permits // Upper { @NotNull Field $string(); @NotNull Upper $string(Field string); } /** * The UUID function. *

* Generate a random UUID. */ public /*sealed*/ interface Uuid extends org.jooq.Field, UEmpty //permits // Uuid {} /** * The DATE ADD function. *

* Add an interval to a date. */ public /*sealed*/ interface DateAdd extends org.jooq.Field //permits // DateAdd { /** * The date to add an interval to */ @NotNull Field $date(); /** * The interval to add to the date */ @NotNull Field $interval(); /** * The date part describing the interval */ @Nullable DatePart $datePart(); /** * The date to add an interval to */ @NotNull DateAdd $date(Field date); /** * The interval to add to the date */ @NotNull DateAdd $interval(Field interval); /** * The date part describing the interval */ @NotNull DateAdd $datePart(DatePart datePart); } /** * The CARDINALITY function. *

* Calculate the cardinality of an array field. */ public /*sealed*/ interface Cardinality extends org.jooq.Field //permits // Cardinality { @NotNull Field $array(); @NotNull Cardinality $array(Field array); } /** * The ARRAY GET function. *

* Get an array element at a given index (1 based). */ public /*sealed*/ interface ArrayGet extends org.jooq.Field //permits // ArrayGet { @NotNull Field $array(); @NotNull Field $index(); @NotNull ArrayGet $array(Field array); @NotNull ArrayGet $index(Field index); } /** * The NVL function. *

* Return the first non-null argument. */ public /*sealed*/ interface Nvl extends org.jooq.Field //permits // Nvl { /** * The nullable value. */ @NotNull Field $value(); /** * The default value if the other value is null. */ @NotNull Field $defaultValue(); /** * The nullable value. */ @NotNull Nvl $value(Field value); /** * The default value if the other value is null. */ @NotNull Nvl $defaultValue(Field defaultValue); } /** * The NULLIF function. */ public /*sealed*/ interface Nullif extends org.jooq.Field //permits // Nullif { /** * The result value if the other value is not equal. */ @NotNull Field $value(); /** * The value to compare the result value with. */ @NotNull Field $other(); /** * The result value if the other value is not equal. */ @NotNull Nullif $value(Field value); /** * The value to compare the result value with. */ @NotNull Nullif $other(Field other); } /** * The CURRENT CATALOG function. */ public /*sealed*/ interface CurrentCatalog extends org.jooq.Field, UEmpty //permits // CurrentCatalog {} /** * The CURRENT SCHEMA function. */ public /*sealed*/ interface CurrentSchema extends org.jooq.Field, UEmpty //permits // CurrentSchema {} /** * The CURRENT USER function. */ public /*sealed*/ interface CurrentUser extends org.jooq.Field, UEmpty //permits // CurrentUser {} /** * The XMLCOMMENT function. */ public /*sealed*/ interface XMLComment extends org.jooq.Field //permits // XMLComment { @NotNull Field $comment(); @NotNull XMLComment $comment(Field comment); } /** * The XMLCONCAT function. */ public /*sealed*/ interface XMLConcat extends org.jooq.Field //permits // XMLConcat { @NotNull UnmodifiableList> $args(); @NotNull XMLConcat $args(Collection> args); } /** * The XMLFOREST function. */ public /*sealed*/ interface XMLForest extends org.jooq.Field //permits // XMLForest { @NotNull UnmodifiableList> $fields(); @NotNull XMLForest $fields(Collection> fields); } /** * The XMLPI function. */ public /*sealed*/ interface XMLPi extends org.jooq.Field //permits // XMLPi { @NotNull Name $target(); @Nullable Field $content(); @NotNull XMLPi $target(Name target); @NotNull XMLPi $content(Field content); } /** * The XMLSERIALIZE function. */ public /*sealed*/ interface XMLSerialize extends org.jooq.Field //permits // XMLSerialize { boolean $content(); @NotNull Field $value(); @NotNull DataType $type(); @NotNull XMLSerialize $content(boolean content); @NotNull XMLSerialize $value(Field value); @NotNull XMLSerialize $type(DataType type); } /** * The JSON ARRAY function. */ public /*sealed*/ interface JSONArray extends Field //permits // JSONArray { @NotNull DataType $type(); @NotNull UnmodifiableList> $fields(); @Nullable JSONOnNull $onNull(); @Nullable DataType $returning(); @NotNull JSONArray $type(DataType type); @NotNull JSONArray $fields(Collection> fields); @NotNull JSONArray $onNull(JSONOnNull onNull); @NotNull JSONArray $returning(DataType returning); } /** * The JSON OBJECT function. */ public /*sealed*/ interface JSONObject extends Field //permits // JSONObject { @NotNull DataType $type(); @NotNull UnmodifiableList> $entries(); @Nullable JSONOnNull $onNull(); @Nullable DataType $returning(); @NotNull JSONObject $type(DataType type); @NotNull JSONObject $entries(Collection> entries); @NotNull JSONObject $onNull(JSONOnNull onNull); @NotNull JSONObject $returning(DataType returning); } /** * The FIELD function. *

* Wrap a condition in a boolean field. */ public /*sealed*/ interface ConditionAsField extends org.jooq.Field //permits // ConditionAsField { @NotNull Condition $condition(); @NotNull ConditionAsField $condition(Condition condition); } /** * The CONDITION function. *

* Create a condition from a boolean field. *

* Databases that support boolean data types can use boolean expressions * as predicates or as columns interchangeably. This extends to any type * of field, including functions. A Postgres example: *

*


     * select 1 where texteq('a', 'a');
     * 
*/ public /*sealed*/ interface FieldCondition extends org.jooq.Condition //permits // FieldCondition { @NotNull Field $field(); @NotNull FieldCondition $field(Field field); } /** * The ANY VALUE function. *

* Get any arbitrary value from the group. */ public /*sealed*/ interface AnyValue extends org.jooq.AggregateFunction //permits // AnyValue { @NotNull Field $field(); @NotNull AnyValue $field(Field field); } /** * The AVG function. */ public /*sealed*/ interface Avg extends org.jooq.AggregateFunction //permits // Avg { @NotNull Field $field(); boolean $distinct(); @NotNull Avg $field(Field field); @NotNull Avg $distinct(boolean distinct); } /** * The BIT AND AGG function. *

* Calculate the bitwise AND aggregate value. */ public /*sealed*/ interface BitAndAgg extends org.jooq.AggregateFunction //permits // BitAndAgg { @NotNull Field $value(); @NotNull BitAndAgg $value(Field value); } /** * The BIT OR AGG function. *

* Calculate the bitwise OR aggregate value. */ public /*sealed*/ interface BitOrAgg extends org.jooq.AggregateFunction //permits // BitOrAgg { @NotNull Field $value(); @NotNull BitOrAgg $value(Field value); } /** * The BIT XOR AGG function. *

* Calculate the bitwise XOR aggregate value. */ public /*sealed*/ interface BitXorAgg extends org.jooq.AggregateFunction //permits // BitXorAgg { @NotNull Field $value(); @NotNull BitXorAgg $value(Field value); } /** * The BIT NAND AGG function. *

* Calculate the bitwise NAND aggregate value. */ public /*sealed*/ interface BitNandAgg extends org.jooq.AggregateFunction //permits // BitNandAgg { @NotNull Field $value(); @NotNull BitNandAgg $value(Field value); } /** * The BIT NOR AGG function. *

* Calculate the bitwise NOR aggregate value. */ public /*sealed*/ interface BitNorAgg extends org.jooq.AggregateFunction //permits // BitNorAgg { @NotNull Field $value(); @NotNull BitNorAgg $value(Field value); } /** * The BIT X NOR AGG function. *

* Calculate the bitwise XNOR aggregate value. */ public /*sealed*/ interface BitXNorAgg extends org.jooq.AggregateFunction //permits // BitXNorAgg { @NotNull Field $value(); @NotNull BitXNorAgg $value(Field value); } /** * The BOOL AND function. */ public /*sealed*/ interface BoolAnd extends org.jooq.AggregateFunction //permits // BoolAnd { @NotNull Condition $condition(); @NotNull BoolAnd $condition(Condition condition); } /** * The BOOL OR function. */ public /*sealed*/ interface BoolOr extends org.jooq.AggregateFunction //permits // BoolOr { @NotNull Condition $condition(); @NotNull BoolOr $condition(Condition condition); } /** * The CORR function. *

* Calculate the correlation coefficient. This standard SQL function may be supported * natively, or emulated using {@link #covarPop(Field, Field)} and {@link #stddevPop(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface Corr extends org.jooq.AggregateFunction //permits // Corr { @NotNull Field $y(); @NotNull Field $x(); @NotNull Corr $y(Field y); @NotNull Corr $x(Field x); } /** * The COUNT function. */ public /*sealed*/ interface Count extends org.jooq.AggregateFunction //permits // Count { @NotNull Field $field(); boolean $distinct(); @NotNull Count $field(Field field); @NotNull Count $distinct(boolean distinct); } /** * The COVAR SAMP function. *

* Calculate the sample covariance. This standard SQL function may be supported natively, * or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an emulation * is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface CovarSamp extends org.jooq.AggregateFunction //permits // CovarSamp { @NotNull Field $y(); @NotNull Field $x(); @NotNull CovarSamp $y(Field y); @NotNull CovarSamp $x(Field x); } /** * The COVAR POP function. *

* Calculate the population covariance. This standard SQL function may be supported * natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an * emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface CovarPop extends org.jooq.AggregateFunction //permits // CovarPop { @NotNull Field $y(); @NotNull Field $x(); @NotNull CovarPop $y(Field y); @NotNull CovarPop $x(Field x); } /** * The MAX function. */ public /*sealed*/ interface Max extends org.jooq.AggregateFunction //permits // Max { @NotNull Field $field(); boolean $distinct(); @NotNull Max $field(Field field); @NotNull Max $distinct(boolean distinct); } /** * The MEDIAN function. */ public /*sealed*/ interface Median extends org.jooq.AggregateFunction //permits // Median { @NotNull Field $field(); @NotNull Median $field(Field field); } /** * The MIN function. */ public /*sealed*/ interface Min extends org.jooq.AggregateFunction //permits // Min { @NotNull Field $field(); boolean $distinct(); @NotNull Min $field(Field field); @NotNull Min $distinct(boolean distinct); } /** * The PRODUCT function. *

* Get the sum over a numeric field: product(distinct field). *

* Few dialects currently support multiplicative aggregation natively. jOOQ * emulates this using exp(sum(log(arg))) for strictly positive * numbers, and does some additional handling for zero and negative numbers. *

* Note that this implementation may introduce rounding errors, even for * integer multiplication. *

* More information here: https://blog.jooq.org/how-to-write-a-multiplication-aggregate-function-in-sql. */ public /*sealed*/ interface Product extends org.jooq.AggregateFunction //permits // Product { @NotNull Field $field(); boolean $distinct(); @NotNull Product $field(Field field); @NotNull Product $distinct(boolean distinct); } /** * The REGR AVGX function. *

* Calculate the average of the independent values (x). This standard SQL function may * be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrAvgX extends org.jooq.AggregateFunction //permits // RegrAvgX { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrAvgX $y(Field y); @NotNull RegrAvgX $x(Field x); } /** * The REGR AVGY function. *

* Calculate the average of the dependent values (y). This standard SQL function may * be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrAvgY extends org.jooq.AggregateFunction //permits // RegrAvgY { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrAvgY $y(Field y); @NotNull RegrAvgY $x(Field x); } /** * The REGR COUNT function. *

* Calculate the number of non-NULL pairs. This standard SQL function may * be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrCount extends org.jooq.AggregateFunction //permits // RegrCount { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrCount $y(Field y); @NotNull RegrCount $x(Field x); } /** * The REGR INTERCEPT function. *

* Calculate the y intercept of the regression line. This standard SQL function may * be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrIntercept extends org.jooq.AggregateFunction //permits // RegrIntercept { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrIntercept $y(Field y); @NotNull RegrIntercept $x(Field x); } /** * The REGR R2 function. *

* Calculate the coefficient of determination. This standard SQL function may be supported * natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an * emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrR2 extends org.jooq.AggregateFunction //permits // RegrR2 { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrR2 $y(Field y); @NotNull RegrR2 $x(Field x); } /** * The REGR SLOPE function. *

* Calculate the slope of the regression line. This standard SQL function may be supported * natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an * emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrSlope extends org.jooq.AggregateFunction //permits // RegrSlope { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrSlope $y(Field y); @NotNull RegrSlope $x(Field x); } /** * The REGR SXX function. *

* Calculate the REGR_SXX auxiliary function. This standard SQL function * may be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrSxx extends org.jooq.AggregateFunction //permits // RegrSxx { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrSxx $y(Field y); @NotNull RegrSxx $x(Field x); } /** * The REGR SXY function. *

* Calculate the REGR_SXY auxiliary function. This standard SQL function * may be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrSxy extends org.jooq.AggregateFunction //permits // RegrSxy { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrSxy $y(Field y); @NotNull RegrSxy $x(Field x); } /** * The REGR SYY function. *

* Calculate the REGR_SYY auxiliary function. This standard SQL function * may be supported natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. * If an emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface RegrSyy extends org.jooq.AggregateFunction //permits // RegrSyy { @NotNull Field $y(); @NotNull Field $x(); @NotNull RegrSyy $y(Field y); @NotNull RegrSyy $x(Field x); } /** * The STDDEV POP function. *

* Calculate the population standard deviation. This standard SQL function may be supported * natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an * emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface StddevPop extends org.jooq.AggregateFunction //permits // StddevPop { @NotNull Field $field(); @NotNull StddevPop $field(Field field); } /** * The STDDEV SAMP function. *

* Calculate the sample standard deviation. This standard SQL function may be supported * natively, or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an * emulation is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface StddevSamp extends org.jooq.AggregateFunction //permits // StddevSamp { @NotNull Field $field(); @NotNull StddevSamp $field(Field field); } /** * The SUM function. */ public /*sealed*/ interface Sum extends org.jooq.AggregateFunction //permits // Sum { @NotNull Field $field(); boolean $distinct(); @NotNull Sum $field(Field field); @NotNull Sum $distinct(boolean distinct); } /** * The VAR POP function. *

* Calculate the population variance. This standard SQL function may be supported natively, * or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an emulation * is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface VarPop extends org.jooq.AggregateFunction //permits // VarPop { @NotNull Field $field(); @NotNull VarPop $field(Field field); } /** * The VAR SAMP function. *

* Calculate the sample variance. This standard SQL function may be supported natively, * or emulated using {@link #sum(Field)} and {@link #count(Field)}. If an emulation * is applied, beware of the risk of "Catastrophic * cancellation" in case the calculations are performed using floating point arithmetic. */ public /*sealed*/ interface VarSamp extends org.jooq.AggregateFunction //permits // VarSamp { @NotNull Field $field(); @NotNull VarSamp $field(Field field); } /** * The Cascade type. *

* Cascade a DDL operation to all dependent objects, or restrict it to this object only. */ public enum Cascade { CASCADE(keyword("cascade")), RESTRICT(keyword("restrict")), ; final Keyword keyword; private Cascade(Keyword keyword) { this.keyword = keyword; } } /** * The CycleOption type. *

* Specify whether a sequence cycles to its minvalue once it reaches its maxvalue. */ public enum CycleOption { CYCLE(keyword("cycle")), NO_CYCLE(keyword("no cycle")), ; final Keyword keyword; private CycleOption(Keyword keyword) { this.keyword = keyword; } } /** * The IdentityRestartOption type. *

* Specify whether an identity column should be restarted upon truncation. */ public enum IdentityRestartOption { CONTINUE_IDENTITY(keyword("continue identity")), RESTART_IDENTITY(keyword("restart identity")), ; final Keyword keyword; private IdentityRestartOption(Keyword keyword) { this.keyword = keyword; } } /** * The GenerationLocation type. *

* Specify where a computed column should be computed, i.e. in the client or on the * server. */ public enum GenerationLocation { CLIENT(keyword("client")), SERVER(keyword("server")), ; final Keyword keyword; private GenerationLocation(Keyword keyword) { this.keyword = keyword; } } /** * The GenerationOption type. *

* Specify whether a computed column should be stored, or computed virtually / on the * fly. */ public enum GenerationOption { STORED(keyword("stored")), VIRTUAL(keyword("virtual")), DEFAULT(keyword("default")), ; final Keyword keyword; private GenerationOption(Keyword keyword) { this.keyword = keyword; } } /** * The WithOrWithoutData type. *

* Specify whether a table created from a subquery should include the subquery's data. */ public enum WithOrWithoutData { WITH_DATA(keyword("with data")), WITH_NO_DATA(keyword("with no data")), ; final Keyword keyword; private WithOrWithoutData(Keyword keyword) { this.keyword = keyword; } } /** * The TableCommitAction type. *

* Specify the action to be taken on temporary tables when committing. */ public enum TableCommitAction { DELETE_ROWS(keyword("delete rows")), PRESERVE_ROWS(keyword("preserve rows")), DROP(keyword("drop")), ; final Keyword keyword; private TableCommitAction(Keyword keyword) { this.keyword = keyword; } } /** * The NullOrdering type. *

* The explicit ordering of NULL values in ORDER BY clauses. If unspecified, the behaviour * is implementation defined. */ public enum NullOrdering { NULLS_FIRST(keyword("nulls first")), NULLS_LAST(keyword("nulls last")), ; final Keyword keyword; private NullOrdering(Keyword keyword) { this.keyword = keyword; } } /** * The NullTreatment type. *

* Specify whether to include NULL values or ignore NULL values in certain window functions. */ public enum NullTreatment { RESPECT_NULLS(keyword("respect nulls")), IGNORE_NULLS(keyword("ignore nulls")), ; final Keyword keyword; private NullTreatment(Keyword keyword) { this.keyword = keyword; } } /** * The FromFirstOrLast type. *

* Specify whether the NTH_VALUE window function should count N values from the first * or last value in the window. */ public enum FromFirstOrLast { FROM_FIRST(keyword("from first")), FROM_LAST(keyword("from last")), ; final Keyword keyword; private FromFirstOrLast(Keyword keyword) { this.keyword = keyword; } } /** * The FrameUnits type. *

* The window frame unit specification. */ public enum FrameUnits { ROWS(keyword("rows")), RANGE(keyword("range")), GROUPS(keyword("groups")), ; final Keyword keyword; private FrameUnits(Keyword keyword) { this.keyword = keyword; } } /** * The FrameExclude type. *

* Specify which values within the window frame should be excluded. */ public enum FrameExclude { CURRENT_ROW(keyword("current row")), TIES(keyword("ties")), GROUP(keyword("group")), NO_OTHERS(keyword("no others")), ; final Keyword keyword; private FrameExclude(Keyword keyword) { this.keyword = keyword; } } /** * The JSONOnNull type. *

* Specify whether a JSON array or object should include NULL values in the output. */ public enum JSONOnNull { NULL_ON_NULL(keyword("null on null")), ABSENT_ON_NULL(keyword("absent on null")), ; final Keyword keyword; private JSONOnNull(Keyword keyword) { this.keyword = keyword; } } /** * The XMLPassingMechanism type. *

* Specify how XML contents should be passed to certain XML functions. */ public enum XMLPassingMechanism { BY_REF(keyword("by ref")), BY_VALUE(keyword("by value")), DEFAULT(keyword("default")), ; final Keyword keyword; private XMLPassingMechanism(Keyword keyword) { this.keyword = keyword; } } /** * The DocumentOrContent type. *

* Specify whether XML content is a DOM document or a document fragment (content). */ public enum DocumentOrContent { DOCUMENT(keyword("document")), CONTENT(keyword("content")), ; final Keyword keyword; private DocumentOrContent(Keyword keyword) { this.keyword = keyword; } } /** * The Materialized type. *

* Hint whether a CTE should be materialised or inlined. If unspecified, the optimiser * may produce implementation defined behaviour. */ public enum Materialized { MATERIALIZED(keyword("materialized")), NOT_MATERIALIZED(keyword("not materialized")), ; final Keyword keyword; private Materialized(Keyword keyword) { this.keyword = keyword; } } /** * The ResultOption type. *

* The data change delta table result semantics. */ public enum ResultOption { OLD(keyword("old")), NEW(keyword("new")), FINAL(keyword("final")), ; final Keyword keyword; private ResultOption(Keyword keyword) { this.keyword = keyword; } } // ------------------------------------------------------------------------- // XXX: Utility API // ------------------------------------------------------------------------- interface UOperator1 extends org.jooq.QueryPart { Q1 $arg1(); @NotNull default R $arg1(Q1 newArg1) { return $constructor().apply(newArg1); } @NotNull Function1 $constructor(); } interface UOperator2 extends org.jooq.QueryPart { Q1 $arg1(); Q2 $arg2(); @NotNull default R $arg1(Q1 newArg1) { return $constructor().apply(newArg1, $arg2()); } @NotNull default R $arg2(Q2 newArg2) { return $constructor().apply($arg1(), newArg2); } @NotNull Function2 $constructor(); } interface UOperator3 extends org.jooq.QueryPart { Q1 $arg1(); Q2 $arg2(); Q3 $arg3(); @NotNull default R $arg1(Q1 newArg1) { return $constructor().apply(newArg1, $arg2(), $arg3()); } @NotNull default R $arg2(Q2 newArg2) { return $constructor().apply($arg1(), newArg2, $arg3()); } @NotNull default R $arg3(Q3 newArg3) { return $constructor().apply($arg1(), $arg2(), newArg3); } @NotNull Function3 $constructor(); } /** * A binary {@link UOperator2} whose operands can be swapped using * {@link #$converse()} producing the converse relation. */ interface UConvertibleOperator extends UOperator2 { /** * Create a new expression with swapped operands, using the converse * operator. */ R $converse(); } /** * A binary {@link UOperator2} whose operands can be swapped using * {@link #$swap()} without changing the operator's semantics. */ interface UCommutativeOperator extends UConvertibleOperator { /** * Create a new expression with swapped operands. */ default R $swap() { return $constructor().apply($arg2(), $arg1()); } @Override default R $converse() { return $swap(); } } /** * A marker interface for {@link QueryPart} implementations that are used * only to render SQL, i.e. they're transient to the expression tree and * don't persist in client code. */ interface UTransient extends UEmpty {} /** * A marker interface for {@link QueryPart} implementations that are mainly * used to render SQL, but unlike {@link UTransient} parts, can also appear * in user expression trees. */ sealed interface UOpaque extends UEmpty permits CustomField, CustomTable, CustomCondition, CustomQueryPart {} /** * A marker interface for {@link QueryPart} implementations whose * {@link QueryPart} semantics has not yet been implemented. * * @deprecated - [#12425] - 3.16.0 - Missing implementations should be added * as soon as possible! */ @Deprecated(forRemoval = true) interface UNotYetImplemented extends UEmpty {} /** * A marker interface for {@link QueryPart} methods that have not yet been * implemented. * * @deprecated - [#12425] - 3.16.0 - Missing implementations should be added * as soon as possible! */ @Deprecated(forRemoval = true) public static class NotYetImplementedException extends RuntimeException {} interface UProxy extends org.jooq.QueryPart { Q $delegate(); } interface UEmpty extends org.jooq.QueryPart { } // ------------------------------------------------------------------------- // XXX: Undisclosed, internal query parts // ------------------------------------------------------------------------- interface UEmptyCondition extends Condition, UEmpty {} interface UEmptyField extends Field, UEmpty {} interface UEmptyTable extends Table, UEmpty {} interface UEmptyStatement extends Statement, UEmpty {} interface UEmptyQuery extends Query, UEmpty {} /** * Turn an array into an unmodifiable {@link UnmodifiableList}. */ @Internal public static final UnmodifiableList unmodifiable(Q[] array) { return unmodifiable(QueryPartListView.wrap(array)); } /** * Turn a {@link List} into an unmodifiable {@link UnmodifiableList}. */ @Internal public static final UnmodifiableList unmodifiable(List list) { return QueryPartListView.wrap(unmodifiableList(list)); } /** * Turn a {@link Collection} into an unmodifiable {@link UnmodifiableList}. */ @Internal public static final UnmodifiableList unmodifiable(Collection collection) { if (collection instanceof List) return unmodifiable((List) collection); else return new QueryPartList<>(unmodifiableCollection(collection)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy