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

co.streamx.fluent.SQL.Directives Maven / Gradle / Ivy

package co.streamx.fluent.SQL;

import co.streamx.fluent.functions.Consumer0;
import co.streamx.fluent.functions.Consumer1;
import co.streamx.fluent.functions.Consumer10;
import co.streamx.fluent.functions.Consumer2;
import co.streamx.fluent.functions.Consumer3;
import co.streamx.fluent.functions.Consumer4;
import co.streamx.fluent.functions.Consumer5;
import co.streamx.fluent.functions.Consumer6;
import co.streamx.fluent.functions.Consumer7;
import co.streamx.fluent.functions.Consumer8;
import co.streamx.fluent.functions.Consumer9;
import co.streamx.fluent.functions.Function1;
import co.streamx.fluent.notation.Alias;
import co.streamx.fluent.notation.BlockTerminator;
import co.streamx.fluent.notation.Capability;
import co.streamx.fluent.notation.CommonTableExpression;
import co.streamx.fluent.notation.CommonTableExpressionType;
import co.streamx.fluent.notation.Context;
import co.streamx.fluent.notation.Function;
import co.streamx.fluent.notation.Keyword;
import co.streamx.fluent.notation.Local;
import co.streamx.fluent.notation.Operator;
import co.streamx.fluent.notation.Parameter;
import co.streamx.fluent.notation.ParameterContext;
import co.streamx.fluent.notation.SubQuery;
import co.streamx.fluent.notation.ViewDeclaration;

public interface Directives {

    @SafeVarargs
    @CommonTableExpression(CommonTableExpressionType.DECORATOR)
    @Function(name = "", omitParentheses = true, parameterContext = ParameterContext.FROM_WITHOUT_ALIAS, parameterContextCapabilities = Capability.ALIAS_INSERT)
    @Operator
    @ViewDeclaration
    static  View viewOf(T tableReference,
                              @Context(ParameterContext.ALIAS) Function1>... columns) {
        throw new UnsupportedOperationException();
    }

    /**
     * Specifies a table to recurse in recursive CTE
     */
    @CommonTableExpression(CommonTableExpressionType.SELF)
    static  T recurseOn(T commonTableExpression) {
        throw new UnsupportedOperationException();
    }

    /**
     * Reference the CTE which will be declared later. Useful in cases where multiple CTEs are defined and one refers
     * another. Since at the point of referral the referred CTE is not declared with {@link SQL#WITH(Object...) WITH},
     * this method should be used to avoid duplicate declaration.
     */
    @CommonTableExpression(CommonTableExpressionType.REFERENCE)
    static  T byRef(T commonTableExpression) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer0 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer1 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer2 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer3 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer4 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer5 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer6 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer7 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer8 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer9 sql) {
        throw new UnsupportedOperationException();
    }

    @SubQuery
    static  T subQuery(Consumer10 sql) {
        throw new UnsupportedOperationException();
    }

    /**
     * lets specify a window frame in OVER clause
     */
    @Function(name = "", omitParentheses = true)
    static WindowFrame windowFrame() {
        throw new UnsupportedOperationException();
    }

    /**
     * Starts Window Function (OVER clause)
     */
    @Function(name = "", omitParentheses = true)
    static > AggregateGroup aggregateBy(T aggregateFunction) {
        throw new UnsupportedOperationException();
    }

    /**
     * Creates an alias
     */
    @Alias
    static > T alias(Value field,
                                                     String alias) {
        throw new UnsupportedOperationException();
    }

    /**
     * Creates an alias
     */
    @Alias
    static , T1> T alias(Value field,
                                                         @Context(ParameterContext.ALIAS) Function1 alias) {
        throw new UnsupportedOperationException();
    }

    /**
     * Creates an alias
     */
    @Alias
    static  co.streamx.fluent.SQL.Alias alias(T field,
                                                        @Context(ParameterContext.ALIAS) Function1 alias) {
        throw new UnsupportedOperationException();
    }

    /**
     * Creates an alias
     */
    @Alias
    static , T1> T alias(T field,
                                                         @Context(ParameterContext.ALIAS) Function1 alias) {
        throw new UnsupportedOperationException();
    }

    /**
     * Creates an alias
     */
    @Alias
    static  T alias(T fieldOrEntity,
                       String alias) {
        throw new UnsupportedOperationException();
    }

    /**
     * Use previously created alias outside of SELECT to beautify the produced SQL. (Inside SELECT it's used
     * automatically, where it actually has an effect).
     */
    @Alias.Use
    static  T aliasOf(T expression) {
        throw new UnsupportedOperationException();
    }

    /**
     * Discards SQL generated by the {@code statements}.
     */
    static void discardSQL(Object... statements) {
    }

    /**
     * Include the passed {@code sql} as is.
     */
    @Local
    static Keyword injectSQL(String sql) {
        return new Keyword() {
            @Override
            public String toString() {
                return sql;
            }
        };
    }

    @Function(name = "--", omitParentheses = true)
    static void comment(Object... statements) {
        throw new UnsupportedOperationException();
    }

    /**
     * Prevents default table aliasing. Useful in rare vendor specific cases. E.g. see
     * Oracle INSERT
     * (Restriction on Table Aliases)
     */
    @Alias(false)
    static void noAlias(Object... entities) {
        throw new UnsupportedOperationException();
    }

    /**
     * Register an argument as a query parameter
     */
    @Parameter
    static  T parameter(T value) {
        throw new UnsupportedOperationException();
    }

    /**
     * Block terminator in SQL
     */
    @BlockTerminator
    @Function(name = ";", omitParentheses = true)
    static void semicolon() {
        throw new UnsupportedOperationException();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy