Examples of dropDatabase()


Examples of com.mongodb.Mongo.dropDatabase()

   * @throws Exception if the test could not connect to the database
   */
  @BeforeClass
  public static void setUpClass() throws Exception {
    Mongo mongo = new Mongo();
    mongo.dropDatabase("mvcctest");
  }
 
  /**
   * Setup test database
   * @throws Exception if the test could not connect to the database
View Full Code Here

Examples of com.mongodb.MongoClient.dropDatabase()

        for (String s : mongoClient.getDatabaseNames()) {
            System.out.println(s);
        }

        // drop a database
        mongoClient.dropDatabase("mydb");

        for (String s : mongoClient.getDatabaseNames()) {
            System.out.println(s);
        }
View Full Code Here

Examples of com.mongodb.MongoClient.dropDatabase()

        for (final DBObject o : list) {
            System.out.println(o);
        }

        // clean up
        mongoClient.dropDatabase("mydb");
        mongoClient.close();
    }
}
View Full Code Here

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.dropDatabase()

  }

  private void dropDatabase() throws IOException {
    OServerAdmin admin = new OServerAdmin("remote:localhost/test");
    admin.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
    admin.dropDatabase("plocal");
  }

  private void createDatabase() throws IOException {
    OServerAdmin admin = new OServerAdmin("remote:localhost/test");
    admin.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
View Full Code Here

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.dropDatabase()

      final OServerAdmin serverAdmin = new OServerAdmin(url);
      serverAdmin.connect("root", "root");

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType()))
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());

      serverAdmin.close();
    } catch (Exception e) {
      throw new IllegalStateException(e);
    }
View Full Code Here

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.dropDatabase()

    if (DB_URL.startsWith("remote:")) {
      OServerAdmin serverAdmin = new OServerAdmin(DB_URL);
      serverAdmin.connect("root", ODatabaseHelper.getServerRootPassword());

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType())) {
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());
      }
      serverAdmin.createDatabase(DB_URL, "graph", OrientGraphTest.getStorageType());
    } else {
      OrientGraph graph = new OrientGraph(DB_URL, DB_USER, DB_PASSWORD);
      graph.drop();
View Full Code Here

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.dropDatabase()

    if (DB_URL.startsWith("remote:")) {
      OServerAdmin serverAdmin = new OServerAdmin(DB_URL);
      serverAdmin.connect("root", ODatabaseHelper.getServerRootPassword());

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType())) {
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());
      }
    } else {
      OrientGraph graph = new OrientGraph(DB_URL, DB_USER, DB_PASSWORD);
      graph.drop();
    }
View Full Code Here

Examples of com.orientechnologies.orient.client.remote.OServerAdmin.dropDatabase()

      final OServerAdmin serverAdmin = new OServerAdmin(url);
      serverAdmin.connect("root", "root");

      if (serverAdmin.existsDatabase(OrientGraphTest.getStorageType()))
        serverAdmin.dropDatabase(OrientGraphTest.getStorageType());

      serverAdmin.close();
    } catch (Exception e) {
      throw new IllegalStateException(e);
    }
View Full Code Here

Examples of org.apache.ddlutils.Platform.dropDatabase()

        Platform platform = getPlatform();

        try
        {
            platform.dropDatabase(dataSource.getDriverClassName(),
                                  dataSource.getUrl(),
                                  dataSource.getUsername(),
                                  dataSource.getPassword());

            _log.info("Dropped database");
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropDatabase()

          new FieldSchema(PART1_NAME, Constants.STRING_TYPE_NAME, ""));
      tbl.getPartitionKeys().add(
          new FieldSchema(PART2_NAME, Constants.STRING_TYPE_NAME, ""));

      client.dropTable(dbName, tableName);
      client.dropDatabase(dbName);

      client.createDatabase(dbName, "newloc");
      client.createTable(tbl);

      tbl = client.getTable(dbName, tableName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.