Package net.hasor.db.jdbc.core

Examples of net.hasor.db.jdbc.core.JdbcTemplate.batchUpdate()


            batchValues[i].put("Account", String.format("acc_%s", i));
            batchValues[i].put("Pwd", String.format("pwd_%s", i));
            batchValues[i].put("Email", String.format("autoUser_%s@hasor.net", i));
            batchValues[i].put("RegTime", new Date());
        }
        jdbc.batchUpdate(batchInsert, batchValues);//批量执行执行插入语句
        HasorUnit.printMapList(jdbc.queryForList("select * from TB_User"));
        //
        showUserCount(jdbc);//显示当前用户总数
    }
    private void showUserCount(JdbcTemplate jdbc) throws SQLException {
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.