private String selectToString() {
    StringBuilder sql = new StringBuilder("select ");
    sql.append(Seq.join(fields, ", "))
       .append(" from ")
       .append(Seq.join(tables, " join "));
    if (!conditions.isEmpty()) {
      sql.append(" where ").append(Seq.join(conditions, " and "));
    }
    if (!groups.isEmpty()) {
      sql.append(" group by ").append(Seq.join(groups, ", "));
      if (!having.isEmpty()) {
        sql.append(" having ").append(Seq.join(having, " and "));
      }
    }
    if (!orders.isEmpty()) {
      sql.append(" order by ").append(Seq.join(orders, ", "));
    }
    if (limit > 0) {
      sql.append(" limit ").append(Integer.toString(limit));
    }
    if (offset > -1) {
      sql.append(" offset ").append(Integer.toString(offset));
    }

    return sql.toString();
  }
private String selectToString() {
    StringBuilder sql = new StringBuilder("select ");
    sql.append(Seq.join(fields, ", "))
       .append(" from ")
       .append(Seq.join(tables, " join "));
    if (!conditions.isEmpty()) {
      sql.append(" where ").append(Seq.join(conditions, " and "));
    }
    if (!groups.isEmpty()) {
      sql.append(" group by ").append(Seq.join(groups, ", "));
      if (!having.isEmpty()) {
        sql.append(" having ").append(Seq.join(having, " and "));
      }
    }
    if (!orders.isEmpty()) {
      sql.append(" order by ").append(Seq.join(orders, ", "));
    }
    if (limit > 0) {
      sql.append(" limit ").append(Integer.toString(limit));
    }
    if (offset > -1) {
      sql.append(" offset ").append(Integer.toString(offset));
    }

    return sql.toString();
  }
private String selectToString ( ) { StringBuilder sql = new StringBuilder ( "select " ) ; sql . append ( Seq . join ( fields , ", " ) ) . append ( " from " ) . append ( Seq . join ( tables , " join " ) ) ; if ( ! conditions . isEmpty ( ) ) { sql . append ( " where " ) . append ( Seq . join ( conditions , " and " ) ) ; } if ( ! groups . isEmpty ( ) ) { sql . append ( " group by " ) . append ( Seq . join ( groups , ", " ) ) ; if ( ! having . isEmpty ( ) ) { sql . append ( " having " ) . append ( Seq . join ( having , " and " ) ) ; } } if ( ! orders . isEmpty ( ) ) { sql . append ( " order by " ) . append ( Seq . join ( orders , ", " ) ) ; } if ( limit > 0 ) { sql . append ( " limit " ) . append ( Integer . toString ( limit ) ) ; } if ( offset > - 1 ) { sql . append ( " offset " ) . append ( Integer . toString ( offset ) ) ; } return sql . toString ( ) ; }
toString
toString