jaskell.sql.Union Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.sql;
import jaskell.script.Directive;
import jaskell.script.Parameter;
import java.util.List;
public class Union extends Query implements ThenSelect {
Directive _prefix;
Directive _query;
public Union() {
}
public Union(Query query) {
this._query = query;
}
public All all(Query query) {
All re = new All();
re._prefix = this._prefix;
re._query = query;
return re;
}
@Override
public String script() {
if (_query == null) {
return String.format("%s UNION", _prefix.script());
} else {
return String.format("%s UNION %s", _prefix.script(), _query.script());
}
}
@Override
public List> parameters() {
List> re = _prefix.parameters();
re.addAll(_query.parameters());
return re;
}
public static class All extends Union implements ThenSelect {
@Override
public String script() {
return String.format("%s UNION ALL %s", _prefix.script(), _query.script());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy