sqlg3.runtime.GTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlg3-runtime Show documentation
Show all versions of sqlg3-runtime Show documentation
SQLG is a preprocessor and a library that uses code generation to simplify writing JDBC code
package sqlg3.runtime;
import java.sql.*;
public abstract class GTest {
public static void setTest(GTest test) {
GBase.test = test;
}
public static GContext testContext(Connection connection, DBSpecific specific, RuntimeMapper mappers) {
SqlTrace noTrace = (ok, time, getMessages) -> {};
GlobalContext global = new GlobalContext(specific, mappers, noTrace);
SessionContext session = new SessionContext(new SingleConnectionManager(connection), null, null);
return new GContext(global, session, new TransactionContext(global, session));
}
public abstract T getNullInterface(Class iface);
public abstract Object getTestObject(Class> paramType);
public abstract void getRowTypeFields(Class> rowType, ResultSet rs, boolean meta) throws SQLException;
public abstract void checkOneColumn(ResultSet rs, Class> cls) throws SQLException;
public abstract void checkSql(PreparedStatement stmt) throws SQLException;
public abstract void statementCreated(Statement stmt, String sql);
public abstract Class> setParamType(String paramId, Class> paramClass);
public abstract void checkStoredProcName(String procNameToCall, Parameter[] parameters) throws SQLException;
public abstract void checkSequenceExists(String sequence) throws SQLException;
}