final SeRow transRow = transSession.issue(new Command<SeRow>() {
@Override
public SeRow execute(ISession session, SeConnection connection) throws SeException,
IOException {
// the query over the transaction connection
SeQuery transQuery = new SeQuery(connection, columns, sqlConstruct);
// transaction is not committed, so transQuery should give
// the
// inserted
// record and query don't
transQuery.prepareQuery();
transQuery.execute();
SeRow transRow = transQuery.fetch();
// querying over a transaction in progress does give diff
// assertEquals(Integer.valueOf(50), transRow.getInteger(0))
transQuery.close();
return transRow;
}
});
assertNotNull(transRow);
// commit transaction
transSession.commitTransaction();
commited = true;
final SeRow noTransRow = session.issue(new Command<SeRow>() {
@Override
public SeRow execute(ISession session, SeConnection connection) throws SeException,
IOException {
SeQuery query = new SeQuery(connection, columns, sqlConstruct);
query.prepareQuery();
query.execute();
SeRow row = query.fetch();
query.close();
return row;
}
});
assertNotNull(noTransRow);