jaskell.sql.ThenSelect 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 interface ThenSelect extends Directive {
default Select select(){
Select re = new Select();
re._prefix = this;
return re;
}
default Select select(String names) {
Select re = new Select(names);
re._prefix = this;
return re;
}
default Select select(String... names) {
Select re = new Select(names);
re._prefix = this;
return re;
}
default Select select(Directive... names) {
Select re = new Select(names);
re._prefix = this;
return re;
}
class Select extends jaskell.sql.Select {
Directive _prefix;
Select(){
super();
}
Select(String names){
super(names);
}
Select(String ... names){
super(names);
}
Select(Directive... names){
super(names);
}
@Override
public String script() {
return String.format("%s %s", _prefix.script(), super.script());
}
@Override
public List> parameters() {
List> re = _prefix.parameters();
re.addAll(super.parameters());
return re;
}
public From from(String name){
From re = new From();
re._from = new Name(name);
re._select = this;
return re;
}
public From from(Directive f) {
From re = new From();
re._select = this;
re._from = f;
return re;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy