* SqlRunner同时提供了带Connection参数的CRUD方法,方便外部提供Connection对象而由使用者提供事务的操作
*
* @param ds 数据源
*/
private static void sqlRunnerDemo(DataSource ds) {
Entity entity = Entity.create(TABLE_NAME).set("字段1", "值").set("字段2", 2);
Entity where = Entity.create(TABLE_NAME).set("条件1", "条件值");
try {
SqlRunner runner = SqlRunner.create(ds);
// 根据DataSource会自动识别数据库方言
runner = SqlRunner.create(ds);