Remove all records matching the records in the given {@link RecordStream}
if it exists.

@param recordStream
@throws SQLException
@throws IOException
493029
protected int remove(Connection connection, RecordStream recordStream)
            throws SQLException, IOException {
        int count = 0;
        PreparedStatement ps = statement(connection, Query.DELETE_RECORD_HASH);
        while (recordStream.hasNext()) {
            VictimsRecord vr = recordStream.getNext();
            setObjects(ps, vr.hash);
            ps.addBatch();
            count++;
        }
        executeBatchAndClose(ps);
        return count;
    }
278483
void removeStream(DefaultStream stream, Iterator<?> itr) {
        final boolean removed;
        if (itr == null) {
            removed = streamMap.remove(stream.id()) != null;
        } else {
            itr.remove();
            removed = true;
        }

        if (removed) {
            for (int i = 0; i < listeners.size(); i++) {
                try {
                    listeners.get(i).onStreamRemoved(stream);
                } catch (Throwable cause) {
                    logger.error("Caught Throwable from listener onStreamRemoved.", cause);
                }
            }

            if (closePromise != null && isStreamMapEmpty()) {
                closePromise.trySuccess(null);
            }
        }
    }
558286
public void remove() throws DBException
    {
        super.remove();
        Iterator<BaseTable> iterator = this.getTables();
        while (iterator.hasNext())
        {
            BaseTable table = iterator.next();
            if ((table != null) && (table != this.getNextTable()))
            {
                if ((table.getRecord().getEditMode() == Constants.EDIT_IN_PROGRESS) || (table.getRecord().getEditMode() == Constants.EDIT_CURRENT))
                    table.remove();
            }
        }
    }
481844
public ODatabaseRecord delete(final ORecordInternal<?> iRecord) {
    executeDeleteRecord(iRecord, -1, true, true, OPERATION_MODE.SYNCHRONOUS);
    return this;
  }
819884
public void remove() throws DBException
    {
        if (this.getCurrentRecord() == this.getBaseRecord())
            super.remove();
        else
        {
            this.getBaseRecord().matchListeners(this.getCurrentRecord(), false, true, true, true, true);      // Clone the listeners that are not there already.
            this.getCurrentRecord().remove();
        }
    }
1335791
public int deleteAll() throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();
		int deleted = db.delete();

		return deleted;
	}
879111
@Trace(dispatcher = true)
	public void removeRecord(Long recordId) throws GloboDnsException {
		NewRelic.setTransactionName(null, "/globodns/removeRecord");
		if (recordId == null) {
			throw new GloboDnsException("Record id cannot be null");
		}
		
		GloboDnsRoot<Record> globoDnsRoot = this.delete("/records/" + recordId + ".json", false);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return;	
	}
1254846
static void closeAllStreams(Iterable<EditLogInputStream> streams) {
    for (EditLogInputStream s : streams) {
      IOUtils.closeStream(s);
    }
  }
866145
public void remove(Object data, int iOpenMode) throws DBException, RemoteException
    {
        synchronized(m_objSync)
        {
            m_tableRemote.remove(data, iOpenMode);
        }
    }
379946
@Override
    public <E extends Exception> void remove(Iteration<? extends Statement, E> statements) throws RepositoryException, E {
        while(statements.hasNext()){
            Statement st = statements.next();
            getClient().sendRemove(null, st.getSubject(), st.getPredicate(), st.getObject());
        }
    }
1173120
protected void deleteCurrentRowData() throws SQLException {
    //move data
    System.arraycopy(data, rowPointer + 1, data, rowPointer, dataSize - 1 - rowPointer);
    data[dataSize - 1] = null;
    dataSize--;
    lastRowPointer = -1;
    previous();
  }
837263
public void remove(Object data, int iOpenMode) throws DBException, RemoteException
    {
        if (m_objCurrentKey == null)
            throw new DBException(Constants.INVALID_RECORD);
        m_mDataMap.remove(m_objCurrentKey);
        if (m_iCurrentRecord != -1)
            m_iCurrentRecord--;     // This will keep the sequential read correct.
        m_iterator = null;
    }
315711
@Override
	public SqlBatch paramStream(final Stream<?> stream) {
		if (this.stream == null) {
			this.stream = stream;
		} else {
			this.stream = Stream.concat(this.stream, stream);
		}
		return this;
	}
453982
@Override
    public boolean remove(Object o) {
        Integer id = indexOf((Record) o);
        if(id == null) {
            return false;
        }
        remove(id);
        return true;
    }
99480
public void remove(Object data, int iOpenMode) throws DBException, RemoteException
    {
        this.checkCurrentCacheIsPhysical(null);
        m_tableRemote.remove(data, iOpenMode);
        if (m_objCurrentCacheRecord != null)
        {
            if (m_mapCache != null)
                m_mapCache.set(((Integer)m_objCurrentCacheRecord).intValue(), NONE);
            else if (m_htCache != null)
                m_htCache.remove(m_objCurrentCacheRecord);
        }
        m_objCurrentPhysicalRecord = NONE;
        m_objCurrentLockedRecord = NONE;
        m_objCurrentCacheRecord = NONE;
    }
1233151
public function removeReadStream($stream)
    {
        $key = (int) $stream;

        if (isset($this->streamsRead[$key])) {
            unset($this->streamsRead[$key]);
        }
        if (isset($this->streamsDuplex[$key]) && !isset($this->streamsWrite[$key])) {
            unset($this->streamsDuplex[$key]);
        }

        GlobalState::set('eventloop.streams.read.current', count($this->streamsRead));
        GlobalState::set('eventloop.streams.total.current', count($this->streamsDuplex));

        $this->loop->removeReadStream($stream);
    }
480413
public void delete(RecordId dataRecordId) {
		// search range must be a constant
		if (!searchRange.isSingleValue())
			throw new IllegalStateException();

		// delete all entry with the specific key
		while (next())
			if (getDataRecordId().equals(dataRecordId)) {
				// ccMgr.modifyLeafBlock(currentPage.currentBlk());
				delete(currentSlot);
				break;
			}

		if (!isOverflowing) {
			/*
			 * If the current regular block is empty or the key of the first
			 * record is not equal to that of records in overflow blocks,
			 * transfer one record from a overflow block to here (if any).
			 */
			if (getOverflowFlag(currentPage) != -1) {
				// get overflow page
				BlockId blk = new BlockId(currentPage.currentBlk().fileName(), getOverflowFlag(currentPage));
				ccMgr.modifyLeafBlock(blk);
				BTreePage overflowPage = new BTreePage(blk, NUM_FLAGS, schema, tx);

				SearchKey firstKey = getKey(currentPage, 0, keyType.length());
				if ((currentPage.getNumRecords() == 0
						|| (overflowPage.getNumRecords() != 0
						&& getKey(overflowPage, 0, keyType.length()) != firstKey))) {
					overflowPage.transferRecords(overflowPage.getNumRecords() - 1,
							currentPage, 0, 1);
					// if the overflow block is empty, make it a dead block
					if (overflowPage.getNumRecords() == 0) {
						long overflowFlag = (getOverflowFlag(overflowPage)
								== currentPage.currentBlk().number())
								? -1 : getOverflowFlag(overflowPage);
						setOverflowFlag(currentPage, overflowFlag);
					}
					overflowPage.close();
				}
			}
		} else {
			/*
			 * If the current overflow block is empty, make it a dead block.
			 */
			if (currentPage.getNumRecords() == 0) {
				// reset the overflow flag of original page
				BlockId blk = new BlockId(currentPage.currentBlk().fileName(), moveFrom);
				// ccMgr.modifyLeafBlock(blk);
				BTreePage prePage = new BTreePage(blk, NUM_FLAGS, schema, tx);
				long overflowFlag = (getOverflowFlag(currentPage) == prePage.currentBlk().number()) ? -1
						: getOverflowFlag(currentPage);
				setOverflowFlag(prePage, overflowFlag);
				prePage.close();
			}
		}
	}