Package tosa.api

Examples of tosa.api.IDatabase


      List<IDatabase> dbs = new ArrayList<IDatabase>();
      System.out.println("***** Reading module with path " + module.getSourcePath());
      IDBDataSource dataSource = new DDLDBDataSource();
      Map<String, DBData> dbDataMap = dataSource.getDBData(module);
      for (Map.Entry<String, DBData> dbDataEntry : dbDataMap.entrySet()) {
        IDatabase database = new DatabaseImpl(dbDataEntry.getKey(), dbDataEntry.getValue(), module);
        // TODO - AHK - Validate things!
        dbs.add(database);
        _dbsByName.put(database.getNamespace(), database);
      }
      _dbsByModule.put(module, dbs);
    }
  }
View Full Code Here


    return (DatabaseImpl) DBLocator.getDatabase("test.testdb");
  }
 
  @BeforeClass
  public static void beforeTestClass() {
    IDatabase database = getDB();
    database.setJdbcUrl("jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1");
    database.getDBUpgrader().recreateTables();
  }
View Full Code Here

    clearTable("ForNumericTests");
  }

  private void clearTable(String tableName) {
    try {
      IDatabase database = DBLocator.getDatabase("test.testdb");
      Connection connection = database.getConnection().connect();
      connection.createStatement().executeUpdate( "DELETE FROM " + tableName );
      connection.close();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
View Full Code Here

TOP

Related Classes of tosa.api.IDatabase

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.