arangoDB.db(databaseName).drop(); } catch (ArangoDBException e) { logger.info("Fail to delete DB: {}", databaseName);
/** * Delete the current database accessed by the driver. * * @throws ArangoDBGraphException if there was an error */ public void deleteDb() throws ArangoDBGraphException { logger.info("Delete current db"); if (db !=null) { try { db.drop(); } catch (ArangoDBException e) { throw ArangoDBExceptions.getArangoDBException(e); } } }
@Override public void dropDatabase() throws DataAccessException { final ArangoDatabase db = db(); try { db.drop(); } catch (final ArangoDBException e) { throw translateExceptionIfPossible(e); } databaseCache.remove(db.name()); collectionCache.keySet().stream().filter(key -> key.getDb().equals(db.name())) .forEach(key -> collectionCache.remove(key)); }
@Override public void dropDatabase() throws DataAccessException { final ArangoDatabase db = db(); try { db.drop(); } catch (final ArangoDBException e) { throw translateExceptionIfPossible(e); } databaseCache.remove(db.name()); collectionCache.keySet().stream().filter(key -> key.getDb().equals(db.name())) .forEach(key -> collectionCache.remove(key)); }