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

io.army.criteria.postgre.PostgreCommand Maven / Gradle / Ivy

There is a newer version: 0.6.6
Show newest version
package io.army.criteria.postgre;

import io.army.criteria.Item;

import java.util.function.BooleanSupplier;
import java.util.function.Supplier;

public interface PostgreCommand extends PostgreStatement {

    interface CursorDirection {

    }

    /*-------------------below DECLARE command syntax interfaces-------------------*/


    interface _DeclareComplexQueryCommand
            extends PostgreQuery._PostgreSelectClause<_AsCommandClause>
            , PostgreValues._PostgreValuesClause<_AsCommandClause> {

    }


    interface _DeclareQueryWithSpec
            extends _PostgreDynamicWithClause<_DeclareComplexQueryCommand>,
            PostgreQuery._PostgreStaticWithClause<_DeclareComplexQueryCommand>,
            _DeclareComplexQueryCommand {


    }

    interface _DeclareForQueryClause {

        _DeclareQueryWithSpec For();

    }

    interface _DeclareWithHoldSpec extends _DeclareForQueryClause {

        _DeclareForQueryClause withHold();

        _DeclareForQueryClause withoutHold();

        _DeclareForQueryClause ifWithHold(BooleanSupplier predicate);

        _DeclareForQueryClause ifWithoutHold(BooleanSupplier predicate);

    }

    interface _DeclareCursorWordClause {

        _DeclareWithHoldSpec cursor();

    }

    interface _DeclareCursorScrollSpec extends _DeclareCursorWordClause {

        _DeclareCursorWordClause scroll();

        _DeclareCursorWordClause noScroll();

        _DeclareCursorWordClause ifScroll(BooleanSupplier predicate);

        _DeclareCursorWordClause ifNoScroll(BooleanSupplier predicate);
    }

    interface _DeclareCursorSensitiveSpec extends _DeclareCursorScrollSpec {

        _DeclareCursorScrollSpec asensitive();

        _DeclareCursorScrollSpec insensitive();

        _DeclareCursorScrollSpec ifAsensitive(BooleanSupplier predicate);

        _DeclareCursorScrollSpec ifInsensitive(BooleanSupplier predicate);


    }

    interface _DeclareCursorBinarySpec extends _DeclareCursorSensitiveSpec {

        _DeclareCursorSensitiveSpec binary();

        _DeclareCursorSensitiveSpec ifBinary(BooleanSupplier predicate);
    }

    interface _DeclareCursorNameClause {

        _DeclareCursorBinarySpec declare(String name);

    }


    interface _SpaceCursorNameClause {

        _AsCommandClause space(String cursorName);

    }

    interface _FromInCursorClause extends _AsCommandClause {

        _AsCommandClause from(String cursorName);

        _AsCommandClause in(String cursorName);

        _SpaceCursorNameClause ifFrom(BooleanSupplier predicate);

        _SpaceCursorNameClause ifIn(BooleanSupplier predicate);

    }


    /*-------------------below FETCH command syntax interfaces-------------------*/


    interface _FetchCursorClause {

        _FromInCursorClause fetch();

        _AsCommandClause fetch(String cursorName);

        _FromInCursorClause fetch(CursorDirection direction);

        _FromInCursorClause fetchIf(Supplier supplier);

    }

    /*-------------------below MOVE syntax interfaces -------------------*/


    interface _MoveCursorClause {

        _FromInCursorClause move();

        _AsCommandClause move(String cursorName);

        _FromInCursorClause move(CursorDirection direction);

        _FromInCursorClause moveIf(Supplier supplier);

    }

    /*-------------------below CLOSE syntax interfaces -------------------*/

    interface _CloseCursorClause {

        _AsCommandClause close(String name);

        _AsCommandClause closeAll();

    }

}