Package org.nutz.dao.impl.sql.callback

Examples of org.nutz.dao.impl.sql.callback.FetchBooleanCallback


            return;
        pojos.initPet();
        dao.insert(Pet.create(4));

        Sql sql = Sqls.create("SELECT 'pet_02' IN (SELECT name FROM t_pet)");
        sql.setCallback(new FetchBooleanCallback());
        dao.execute(sql);
        boolean pet02IsExsit = sql.getBoolean();
        assertEquals(true, pet02IsExsit);

        sql = Sqls.create("SELECT 'pet_05' IN (SELECT name FROM t_pet)");
        sql.setCallback(new FetchBooleanCallback());
        dao.execute(sql);
        boolean pet05IsExsit = sql.getBoolean();
        assertEquals(false, pet05IsExsit);
    }
View Full Code Here

TOP

Related Classes of org.nutz.dao.impl.sql.callback.FetchBooleanCallback

Copyright © 2018 www.massapicom. 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.