@Test public void and() { Sql sql = Sql.New("SELECT * FROM table") .where() .and(Cond.le("c0", null)) .and(Cond.eq("c1", null)) .and(() -> Cond.eq("c2", 1) .or(Cond.eq("c3", 2))); System.out.println(sql); }
public Sql and(Cond cond) { if (StrUtil.isBlankIfStr(cond.sql)) { return this; } this.append(StrUtil.format(" AND{}", cond.sql), cond.params); return this; }
Sql extends Clause implements Serializable { public Sql and(Cond cond) { if (StrUtil.isBlankIfStr(cond.sql)) { return this; } this.append(StrUtil.format(" AND{}", cond.sql), cond.params); return this; } }
Sql extends Clause implements Serializable { public Sql and(Cond cond) { if (StrUtil.isBlankIfStr(cond.sql)) { return this; } this.append(StrUtil.format(" AND{}", cond.sql), cond.params); return this; } Sql();  Sql(String sql);  Sql(String sql, Object param1, Object... params);  Sql(String sql,
      Collection params);  Sql(Sql sql); }
Sql extends Clause implements Serializable { public Sql and(Cond cond) { if (StrUtil.isBlankIfStr(cond.sql)) { return this; } this.append(StrUtil.format(" AND{}", cond.sql), cond.params); return this; } Sql();  Sql(String sql);  Sql(String sql, Object param1, Object... params);  Sql(String sql,
      Collection params);  Sql(Sql sql); static Sql New(String sql); Sql append(Sql sql); Sql append(String sql); Sql append(String sql,
      Object param,
      Object... params); Sql append(String sql,
      Collection params); static Sql SelectAll(); static Sql Select(String field,
      String... fields); Sql selectAll(); Sql select(String field,
      String... fields); Sql from(String tableName); Sql from(String tableName,
      String alias); Sql from(Sql sql,
      String alias); Sql from(Supplier<Sql> supplier,
      String alias); Sql leftJoin(String tableName,
      String alias,
      String onClause); Sql leftJoin(Sql sql,
      String alias,
      String onClause); Sql leftJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql rightJoin(String tableName,
      String alias,
      String onClause); Sql rightJoin(Sql sql,
      String alias,
      String onClause); Sql rightJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql innerJoin(String tableName,
      String alias,
      String onClause); Sql innerJoin(Sql sql,
      String alias,
      String onClause); Sql innerJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql fullJoin(String tableName,
      String alias,
      String onClause); Sql fullJoin(Sql sql,
      String alias,
      String onClause); Sql fullJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql where(); Sql where(Cond cond); Sql where(String sql); Sql where(String sql,
      Collection params); Sql and(Cond cond); Sql and(Supplier<Cond> supplier); Sql or(Cond cond); Sql or(Supplier<Cond> supplier); Sql union(); Sql unionAll(); Sql groupBy(String field,
      String... fields); Sql having(); Sql having(String sql); Sql having(String sql,
      Collection params); Sql orderBy(String field); Sql orderBy(String field,
      String... fields); Sql limit(int row); Sql limit(int offset,
      int row); static Sql Insert(String table,
      String field,
      String... fields); static Sql Insert(String table,
      Map<String, Object> map); Sql values(Object param,
      Object... params); static Sql Update(String table); Sql set(String expression); Sql set(String field,
      Object param); Sql set(Map<String, Object> map); static Sql Delete(String table); static Sql Delete(String table,
      String alias); @Override String toString(); }
Sql extends Clause implements Serializable { public Sql and(Cond cond) { if (StrUtil.isBlankIfStr(cond.sql)) { return this; } this.append(StrUtil.format(" AND{}", cond.sql), cond.params); return this; } Sql();  Sql(String sql);  Sql(String sql, Object param1, Object... params);  Sql(String sql,
      Collection params);  Sql(Sql sql); static Sql New(String sql); Sql append(Sql sql); Sql append(String sql); Sql append(String sql,
      Object param,
      Object... params); Sql append(String sql,
      Collection params); static Sql SelectAll(); static Sql Select(String field,
      String... fields); Sql selectAll(); Sql select(String field,
      String... fields); Sql from(String tableName); Sql from(String tableName,
      String alias); Sql from(Sql sql,
      String alias); Sql from(Supplier<Sql> supplier,
      String alias); Sql leftJoin(String tableName,
      String alias,
      String onClause); Sql leftJoin(Sql sql,
      String alias,
      String onClause); Sql leftJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql rightJoin(String tableName,
      String alias,
      String onClause); Sql rightJoin(Sql sql,
      String alias,
      String onClause); Sql rightJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql innerJoin(String tableName,
      String alias,
      String onClause); Sql innerJoin(Sql sql,
      String alias,
      String onClause); Sql innerJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql fullJoin(String tableName,
      String alias,
      String onClause); Sql fullJoin(Sql sql,
      String alias,
      String onClause); Sql fullJoin(Supplier<Sql> supplier,
      String alias,
      String onClause); Sql where(); Sql where(Cond cond); Sql where(String sql); Sql where(String sql,
      Collection params); Sql and(Cond cond); Sql and(Supplier<Cond> supplier); Sql or(Cond cond); Sql or(Supplier<Cond> supplier); Sql union(); Sql unionAll(); Sql groupBy(String field,
      String... fields); Sql having(); Sql having(String sql); Sql having(String sql,
      Collection params); Sql orderBy(String field); Sql orderBy(String field,
      String... fields); Sql limit(int row); Sql limit(int offset,
      int row); static Sql Insert(String table,
      String field,
      String... fields); static Sql Insert(String table,
      Map<String, Object> map); Sql values(Object param,
      Object... params); static Sql Update(String table); Sql set(String expression); Sql set(String field,
      Object param); Sql set(Map<String, Object> map); static Sql Delete(String table); static Sql Delete(String table,
      String alias); @Override String toString();  }