コード例 #1
0
 public static AnsiSelectBuilder from(final SqlGrammar grammar, final Definition definition) {
   return new AnsiSelectBuilder(
       grammar,
       grammar.selectExpression(
           Option.<SetQuantifier>none(),
           definition.fields(),
           definition,
           Option.<Predicate<? super Record>>none(),
           Option.<Comparator<? super Record>>none(),
           Option.<Sequence<? extends Keyword<?>>>none(),
           none(Integer.class),
           none(Integer.class)));
 }
コード例 #2
0
 @Override
 public AnsiSelectBuilder count() {
   return from(
       grammar,
       selectExpression(
           expression.setQuantifier(),
           grammar.selectList(countStar()),
           expression.fromClause(),
           expression.whereClause(),
           Option.<OrderByClause>none(),
           expression.groupByClause(),
           expression.offsetClause(),
           expression.fetchClause()));
 }
コード例 #3
0
 @Override
 public AnsiSelectBuilder fetch(int number) {
   return from(
       grammar,
       selectExpression(
           expression.setQuantifier(),
           expression.selectList(),
           expression.fromClause(),
           expression.whereClause(),
           expression.orderByClause(),
           expression.groupByClause(),
           expression.offsetClause(),
           some(grammar.fetchClause(number))));
 }
コード例 #4
0
 @Override
 public AnsiSelectBuilder filter(final Predicate<? super Record> predicate) {
   return filter(grammar.whereClause(predicate));
 }
コード例 #5
0
 @Override
 public AnsiSelectBuilder select(final Sequence<? extends Keyword<?>> columns) {
   if (columns.isEmpty()) return this;
   return select(grammar.selectList(columns));
 }
コード例 #6
0
 @Override
 public ExpressionBuilder join(Join join) {
   return grammar.join(this, join);
 }
コード例 #7
0
 @Override
 public AnsiSelectBuilder groupBy(Sequence<? extends Keyword<?>> columns) {
   return groupBy(grammar.groupByClause(columns));
 }
コード例 #8
0
 @Override
 public AnsiSelectBuilder orderBy(final Comparator<? super Record> comparator) {
   return orderBy(grammar.orderByClause(comparator));
 }