de.ec.sql.BeforeFrom Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlbuilder Show documentation
Show all versions of sqlbuilder Show documentation
Java builder to create SQL statements
package de.ec.sql;
import java.util.ArrayList;
import java.util.List;
public interface BeforeFrom extends QueryPart {
default From from() {
return new From(this);
}
default From from(final String... tables) {
return new From(this).tables(tables);
}
default From from(final Table... tables) {
final List names = new ArrayList<>(tables.length);
for (final Table table : tables)
names.add(table.tableName());
return from(names.toArray(new String[tables.length]));
}
default From from(final From from) {
return from.builder(this);
}
default From fromSQL(final String sql) {
return from().sql(sql);
}
}