Package jodd.db

Examples of jodd.db.DbQuery.executeCount()


    assertEquals(1, DbEntitySql.insert(new BadBoy(Integer.valueOf(1), "Johny", Integer.valueOf(3))).query().autoClose().executeUpdate());
    assertEquals(0, session.getTotalQueries());

    DbQuery dq = new DbQuery("select count(*) from GIRL where id>:id");
    dq.setInteger("id", 1);
    assertEquals(2, dq.executeCount());

    //dq.reset();
    dq.setInteger("id", 10);
    assertEquals(1, session.getTotalQueries());
    assertEquals(0, dq.autoClose().executeCount());
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.