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

jaskell.sql.Where Maven / Gradle / Ivy

Go to download

This is a utils library for java 8 project. It include parsec combinators and sql generators library.

There is a newer version: 2.9.2
Show newest version
package jaskell.sql;

import jaskell.script.Directive;
import jaskell.script.Parameter;

import java.util.List;

public class Where extends Query implements CouldOrder, CouldGroup, CouldLimit, CouldOffset,
        CouldAlias, CouldHaving, CouldUnion {
    Directive _prefix;
    Predicate _predicate;

    Where(Predicate predicate){
        this._predicate = predicate;
    }

    @Override
    public String script() {
        return String.format("%s WHERE %s", _prefix.script(), _predicate.script());
    }

    @Override
    public List> parameters() {
        List> re = _prefix.parameters();
        re.addAll(_predicate.parameters());
        return re;
    }

    public Group group() {
        Group re = new Group();
        re._prefix = this;
        return re;
    }

    public Order order() {
        Order re = new Order();
        re._prefix = this;
        return re;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy