Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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 extends CommonTableExpression>> $commonTableExpressions();
boolean $recursive();
}
// -------------------------------------------------------------------------
// XXX: Queries
// -------------------------------------------------------------------------
public /*sealed*/ interface CreateType
extends
DDLQuery
/*permits
CreateTypeImpl*/
{
@NotNull Name $name();
@NotNull UnmodifiableList extends Field> $values();
}
public /*sealed*/ interface DropType
extends
DDLQuery
/*permits
DropTypeImpl*/
{
@NotNull UnmodifiableList extends Name> $names();
boolean $ifExists();
@Nullable Cascade $cascade();
}
public /*sealed*/ interface CreateView
extends
DDLQuery
/*permits
CreateViewImpl*/
{
boolean $ifNotExists();
boolean $orReplace();
@NotNull Table> $view();
@NotNull UnmodifiableList extends Field>> $fields();
@NotNull ResultQuery $query();
}
// -------------------------------------------------------------------------
// XXX: Schema
// -------------------------------------------------------------------------
public interface PrimaryKey extends Constraint {
@NotNull UnmodifiableList extends Field>> $fields();
}
public interface UniqueKey extends Constraint {
@NotNull UnmodifiableList extends Field>> $fields();
}
public interface ForeignKey extends Constraint {
@NotNull UnmodifiableList extends Field>> $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