Package com.xiaoleilu.hutool.db

Examples of com.xiaoleilu.hutool.db.SqlRunner.update()


      // 删,生成SQL为 DELETE FROM `table_name` WHERE `条件1` = ?
      runner.del(where);

      // 改,生成SQL为 UPDATE `table_name` SET `字段1` = ?, `字段2` = ? WHERE `条件1` = ?
      runner.update(entity, where);

      // 查,生成SQL为 SELECT * FROM `table_name` WHERE WHERE `条件1` = ? 第一个参数为返回的字段列表,如果null则返回所有字段
      List<Entity> entityList = runner.find(null, where, new EntityHandler());
      log.info("{}", entityList);

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.