Search in sources :

Example 1 with SQLAssert

use of io.shardingjdbc.core.integrate.jaxb.SQLAssert in project sharding-jdbc by shardingjdbc.

the class SQLAssertJAXBHelper method dataParameters.

private static Collection<Object[]> dataParameters(final File file) {
    SQLAsserts asserts = loadSQLAsserts(file);
    List<Object[]> result = new ArrayList<>();
    for (int i = 0; i < asserts.getSqlAsserts().size(); i++) {
        SQLAssert assertObj = asserts.getSqlAsserts().get(i);
        for (DatabaseType each : getDatabaseTypes(SQLCasesLoader.getInstance().getDatabaseTypes(assertObj.getId()))) {
            result.add(getDataParameter(assertObj, each));
        }
    }
    return result;
}
Also used : DatabaseType(io.shardingjdbc.core.constant.DatabaseType) ArrayList(java.util.ArrayList) SQLAsserts(io.shardingjdbc.core.integrate.jaxb.SQLAsserts) SQLAssert(io.shardingjdbc.core.integrate.jaxb.SQLAssert)

Aggregations

DatabaseType (io.shardingjdbc.core.constant.DatabaseType)1 SQLAssert (io.shardingjdbc.core.integrate.jaxb.SQLAssert)1 SQLAsserts (io.shardingjdbc.core.integrate.jaxb.SQLAsserts)1 ArrayList (java.util.ArrayList)1