in src/main/java/com/googlesource/gerrit/plugins/verifystatus/server/schema/ScriptRunner.java [54:74]
void run(CiDb db) throws OrmException {
try {
JdbcSchema schema = (JdbcSchema) db;
Connection c = schema.getConnection();
SqlDialect dialect = schema.getDialect();
try (Statement stmt = c.createStatement()) {
for (String sql : commands) {
try {
if (!dialect.isStatementDelimiterSupported()) {
sql = CharMatcher.is(';').trimTrailingFrom(sql);
}
stmt.execute(sql);
} catch (SQLException e) {
throw new OrmException("Error in " + name + ":\n" + sql, e);
}
}
}
} catch (SQLException e) {
throw new OrmException("Cannot run statements for " + name, e);
}
}