Search in sources :

Example 1 with Enumerator

use of jodd.db.oom.tst.Enumerator in project jodd by oblac.

the class DbEnumTest method testEnums.

@Test
public void testEnums() {
    DbSession session = new DbThreadSession(cp);
    String sql = "create table ENUMERATOR(ID int, NAME varchar(20), STATUS int)";
    DbQuery query = new DbQuery(sql);
    query.executeUpdate();
    Enumerator e = new Enumerator();
    e.id = 2;
    e.name = "Ikigami";
    e.status = Enumerator.STATUS.ONE;
    DbSqlGenerator gen = insert(e);
    query = new DbOomQuery(gen);
    query.executeUpdate();
    session.closeSession();
}
Also used : DbSession(jodd.db.DbSession) DbQuery(jodd.db.DbQuery) Enumerator(jodd.db.oom.tst.Enumerator) DbThreadSession(jodd.db.DbThreadSession) Test(org.junit.Test)

Aggregations

DbQuery (jodd.db.DbQuery)1 DbSession (jodd.db.DbSession)1 DbThreadSession (jodd.db.DbThreadSession)1 Enumerator (jodd.db.oom.tst.Enumerator)1 Test (org.junit.Test)1