Package org.jtester.module.database.environment

Examples of org.jtester.module.database.environment.DBEnvironment


    DBEnvironment environment = workingEnvironment();
    return new QueryStatsFixture(environment);
  }

  public Fixture inspectProcedure(String procName) {
    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_PROCEDURE, procName);
  }
View Full Code Here


    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_PROCEDURE, procName);
  }

  public Fixture inspectTable(String tableName) {
    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_TABLE, tableName);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_TABLE, tableName);
  }

  public Fixture inspectView(String tableName) {
    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_TABLE, tableName);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_TABLE, tableName);
  }

  public Fixture inspectQuery(String query) {
    DBEnvironment environment = workingEnvironment();
    return new InspectFixture(environment, InspectFixture.MODE_QUERY, query);
  }
View Full Code Here

   * @param query
   * @param symbolName
   * @return
   */
  public Fixture storeQueryTable(String query, String symbolName) {
    DBEnvironment environment = workingEnvironment();
    return new StoreQueryTableFixture(environment, query, symbolName);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return new StoreQueryTableFixture(environment, query, symbolName);
  }

  public Fixture compareStoredQueries(String symbol1, String symbol2) {
    DBEnvironment environment = workingEnvironment();
    return new CompareStoredQueriesFixture(environment, symbol1, symbol2);
  }
View Full Code Here

   * 返回当前的数据库环境
   *
   * @return
   */
  public DBEnvironment workingEnvironment() {
    DBEnvironment environment = DBEnvironmentFactory.getCurrentDBEnvironment();
    return environment;
  }
View Full Code Here

@SuppressWarnings({ "unchecked", "rawtypes" })
public class SqlRunner {

  public static void commit() {
    try {
      DBEnvironment environment = DBEnvironmentFactory.getCurrentDBEnvironment();
      environment.connectIfNeeded();
      environment.commit();
    } catch (Exception e) {
      throw ExceptionWrapper.getUndeclaredThrowableExceptionCaused(e);
    }
  }
View Full Code Here

    }
  }

  public static void rollback() {
    try {
      DBEnvironment environment = DBEnvironmentFactory.getCurrentDBEnvironment();
      environment.connectIfNeeded();
      environment.rollback();
    } catch (Exception e) {
      throw ExceptionWrapper.getUndeclaredThrowableExceptionCaused(e);
    }
  }
View Full Code Here

   *
   * @param sql
   * @throws SQLException
   */
  public static void execute(String sql) {
    DBEnvironment environment = DBEnvironmentFactory.getCurrentDBEnvironment();
    environment.connectIfNeeded();
    PreparedStatement st = null;
    try {
      st = environment.createStatementWithBoundFixtureSymbols(sql);
      st.execute();
    } catch (Throwable e) {
      throw ExceptionWrapper.getUndeclaredThrowableExceptionCaused(e);
    } finally {
      DBHelper.closeStatement(st);
View Full Code Here

TOP

Related Classes of org.jtester.module.database.environment.DBEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.