All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sqlg3.runtime.GTest Maven / Gradle / Ivy

Go to download

SQLG is a preprocessor and a library that uses code generation to simplify writing JDBC code

There is a newer version: 3.1
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy