use of com.mysql.cj.MysqlxSession in project aws-mysql-jdbc by awslabs.
the class DevApiBaseTestCase method sqlUpdate.
protected void sqlUpdate(String sql) {
try {
Field f = SessionImpl.class.getDeclaredField("session");
f.setAccessible(true);
MysqlxSession mysqlxSession = (MysqlxSession) f.get(this.session);
mysqlxSession.query(mysqlxSession.getMessageBuilder().buildSqlStatement(sql), new UpdateResultBuilder<>());
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
use of com.mysql.cj.MysqlxSession in project aws-mysql-jdbc by awslabs.
the class InternalXBaseTestCase method createTestSession.
public MysqlxSession createTestSession() {
PropertySet pset = new DefaultPropertySet();
pset.initializeProperties(this.testProperties);
MysqlxSession session = new MysqlxSession(this.testHostInfo, pset);
return session;
}
Aggregations