<p>Delete database in inner DB folder, NOT current DB!</p>
@param pDbName database name without extension
@throws Exception - an exception
183659
@Override
  public final void deleteDatabase(final String pDbName) throws Exception {
    String dbNm = this.databasePrefix + pDbName + ".sqlite";
    if (!dbNm.equals(this.factoryAppBeans.getDatabaseName())) {
      File dbFile = new File(this.databaseDir + File.separator + dbNm);
      if (dbFile.exists() && !dbFile.delete()) {
        throw new ExceptionWithCode(ExceptionWithCode.SOMETHING_WRONG,
          "Can't delete file: " + dbFile);
      }
    }
  }
663161
public void delete() throws CouchbaseLiteException {
        synchronized (lock) {
            mustBeOpen();

            Log.i(DOMAIN, "Deleting %s at path %s", this, getC4Database().getPath());

            if (activeReplications.size() > 0) {
                throw new CouchbaseLiteException(
                    "Cannot delete the database.  Please stop all of the replicators before closing the database.",
                    CBLError.Domain.CBLITE, CBLError.Code.BUSY);
            }


            if (activeLiveQueries.size() > 0) {
                throw new CouchbaseLiteException(
                    "Cannot delete the database.  Please remove all of the query listeners before closing the "
                        + "database.",
                    CBLError.Domain.CBLITE,
                    CBLError.Code.BUSY);
            }

            // cancel purge timer
            cancelPurgeTimer();

            // delete db
            deleteC4DB();

            // release instances
            freeC4Observers();
            freeC4DB();

            // shutdown executor service
            shutdownExecutorService();
        }
    }
892995
public function dumpDB($dumpName = 'test')
    {
        $tables = $this->getDbTables();

        if (empty($tables)) {
            $dbName = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('dbName');
            throw new Exception("no tables on '$dbName'' database");
        }

        $columns = $this->getTableColumns($tables);
        $data = $this->getTableData($tables);
        $checksum = $this->getTableChecksum($tables);

        $this->dbDump[$dumpName] = array('columns' => $columns, 'data' => $data, 'checksum' => $checksum);
    }
943667
@Override
	public JdbcDatabaseDescriptor dbByName(final String dbName) {
		Collection<H2DatabaseWorking> select = CollectionUtils.select(dbsw, new Predicate<H2DatabaseWorking>() {

			@Override
			public boolean evaluate(H2DatabaseWorking db) {
				return dbName.equals( db.getName() );
			}

		});
		if(CollectionUtils.size(select)==0){
			throw new IllegalArgumentException("There are no databases called '" + dbName + "'");
		}
		if(CollectionUtils.size(select)>=2){
			throw new IllegalArgumentException("More than one database is called '" + dbName + "'");
		}
		return CollectionUtils.extractSingleton( select );
	}
542462
function destroyDatabase(name, cb) {
  if(name === user_dbname)
    throw new Error('We never ever delete that database.')
  nano().db.destroy(name, function(err) {
    if(err && err.status_code !== 404) return cb(err)
    cb(null, err ? false : true)
  })
}
150857
public void delete_property(String name, DbDatum[] properties) throws DevFailed {
		databaseDAO.delete_property(this, name, properties);
	}
1051503
@Override
    public void deleteIndex(final String indexName) throws QueryException {
        Misc.checkNotNullOrEmpty(indexName, "indexName");

        Future<Void> result = dbQueue.submitTransaction(new DeleteIndexCallable(indexName));

        try {
            result.get();
        } catch (ExecutionException e) {
            String message = "Execution error during index deletion";
            logger.log(Level.SEVERE, message, e);
            throw new QueryException(message, e);
        } catch (InterruptedException e) {
            String message = "Execution interrupted error during index deletion";
            logger.log(Level.SEVERE, message, e);
            throw new QueryException(message, e);
        }

    }
773132
@Override
  public final void createDatabase(final String pDbName,
    final int pDbId) throws Exception {
    String dbNm = this.databasePrefix + pDbName + ".sqlite";
    synchronized (this.factoryAppBeans) {
      if (!this.factoryAppBeans.getDatabaseName().equals(dbNm)) {
        this.factoryAppBeans.setDatabaseName(dbNm);
        this.factoryAppBeans.setNewDatabaseId(pDbId);
        this.factoryAppBeans.handleDatabaseChanged();
      }
    }
  }
1271572
public static base_response delete(nitro_service client, String communityname) throws Exception {
		snmpcommunity deleteresource = new snmpcommunity();
		deleteresource.communityname = communityname;
		return deleteresource.delete_resource(client);
	}
737442
def DbDeleteServer(self, argin):
        
        self._log.debug("In DbDeleteServer()")

        if '*' in argin or '%' in argin or not '/' in argin:
            self.warn_stream("DataBase::db_delete_server(): server name " + argin + " incorrect ")
            th_exc(DB_IncorrectServerName,
                   "failed to delete server, server name incorrect",
                   "DataBase::DeleteServer()")

        self.db.delete_server(argin)
1331500
public void createAndOpenUntitledDb() throws ClassNotFoundException, Exception {

		getDb().close(false, session.isCleanUpRequired());

		// delete all untitled session db in "session" directory
		File dir = new File(getSession().getSessionFolder());
		File[] listFile = dir.listFiles(new FilenameFilter() {
			@Override
			public boolean accept(File dir1, String fileName) {
				if (fileName.startsWith("untitled")) {
					return true;
				}
				return false;
			}
		});
		for (int i = 0; i < listFile.length; i++) {
			if (!listFile[i].delete()) {
				// ZAP: Log failure to delete file
				logger.error("Failed to delete file " + listFile[i].getAbsolutePath());
			}
		}

		// ZAP: Check if files exist.
		// copy and create new template db
		currentDBNameUntitled = DBNAME_UNTITLED + DBNAME_COPY;
		FileCopier copier = new FileCopier();
		File fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".data");
		if (fileIn.exists()) {
			File fileOut = new File(currentDBNameUntitled + ".data");
			if (fileOut.exists() && !fileOut.delete()) {
				// ZAP: Log failure to delete file
				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
			}

			copier.copy(fileIn, fileOut);
		}

		fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".properties");
		if (fileIn.exists()) {
			File fileOut = new File(currentDBNameUntitled + ".properties");
			if (fileOut.exists() && !fileOut.delete()) {
				// ZAP: Log failure to delete file
				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
			}

			copier.copy(fileIn, fileOut);
		}

		fileIn = new File(Constant.getZapInstall(), DBNAME_TEMPLATE + ".script");
		if (fileIn.exists()) {
			File fileOut = new File(currentDBNameUntitled + ".script");
			if (fileOut.exists() && !fileOut.delete()) {
				// ZAP: Log failure to delete file
				logger.error("Failed to delete file " + fileOut.getAbsolutePath());
			}

			copier.copy(fileIn, fileOut);
		} else {
			String fallbackResource = "/org/zaproxy/zap/resources/zapdb.script";
			try (InputStream is = Model.class.getResourceAsStream(fallbackResource)) {
				if (is == null) {
					throw new FileNotFoundException("Bundled resource not found: " + fallbackResource);
				}
				Files.copy(is, Paths.get(currentDBNameUntitled + ".script"));
			}
		}

		fileIn = new File(currentDBNameUntitled + ".backup");
		if (fileIn.exists()) {
			if (!fileIn.delete()) {
				// ZAP: Log failure to delete file
				logger.error("Failed to delete file " + fileIn.getAbsolutePath());
			}
		}

		// ZAP: Handle the "lobs" file.
		fileIn = new File(currentDBNameUntitled + ".lobs");
		if (fileIn.exists()) {
			if (!fileIn.delete()) {
				logger.error("Failed to delete file " + fileIn.getAbsolutePath());
			}
		}

		getDb().open(currentDBNameUntitled);
		DBNAME_COPY++;
	}
1157167
public function deleteRecord($tableName, $value, $field)
    {
        try {
            $this->db->deleteRecord($tableName, $value, $field);
        } catch (\Exception $e) {
            throw new DbException($e->getMessage());
        }
    }
250588
public void deleteDB(String dbName) {
        assertNotEmpty(dbName, "dbName");
        delete(new DatabaseURIHelper(getBaseUri(), dbName).getDatabaseUri());

    }
639258
@Override
  public final void backupDatabase(final String pDbName) throws Exception {
    String dbPath = this.databaseDir + File.separator + pDbName + ".sqlite";
    File dbFile = new File(dbPath);
    if (dbFile.exists()) {
      String encPath = this.backupDir + File.separator + pDbName + ".sqlten";
      File dbBkFile = new File(encPath);
      if (dbBkFile.exists()) {
        Long time = new Date().getTime();
        encPath = this.backupDir + File.separator + pDbName + time + ".sqlten";
      }
      this.cryptoHelper.encryptFile(dbPath, encPath);
    }
  }
820775
public void doRemove() throws DBException
    {
        try   {
            m_objLastModBookmark = null;
            m_tableRemote.remove(null, this.getRecord().getOpenMode());
        } catch (RemoteException ex) {
            throw new DBException(ex.getMessage());
        }
    }
1270805
public void deleteRow(Object rowKey, String tableName, String columnFamilyName) throws IOException
    {
        hbaseWriter.delete(gethTable(tableName), rowKey, columnFamilyName);
    }
917501
public void deleteProject(String name) throws Exception {

        m_cms.deleteProject(m_cms.readProject(name).getUuid());
    }