use of jodd.db.DbQuery 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();
}
Aggregations