Once you delete a row, google API may incorrectly delete future rows. The only garuntee is to fetch a single row then delete it.
345035
function ensureRowsDeleted(rows) {
      async.whilst(
        () => rows.length,
        (cb) => {
          rows[0].del(() => {
            sheet.getRows(query_options, (err, _rows) => {
              rows = _rows;
              cb();
            });
          });
        },
        next);
    }
251976
private void deleteNoCheck(Session session, Row row) {

        if (row.isDeleted(session)) {
            return;
        }

        session.addDeleteAction(this, row);
    }
649006
async function deleteEntries(worksheetInfo, entityIds) {

    entityIds.reverse();

    // since google pushes up the removed row, the ID will change to the previous
    // avoiding this iterate through the collection in reverse order
    // TODO: needs performance improvement
    var response;

    for (let id of entityIds) {
        let payload = util._extend({entityId: id}, worksheetInfo);
        response = await executeRequest('delete_entry', payload);
    }

    cache.clear();
    return response;
}
1054301
function(callback) {
                if (db && !cacheDeletingInProgress) {
                    cacheDeletingInProgress = true;
                    db.threads
                        .where('owner')
                        .equals(userInfo.id)
                        .delete()
                        .then(function() {
                            console.log('threads table deleted');

                            db.contacts
                                .where('owner')
                                .equals(userInfo.id)
                                .delete()
                                .then(function() {
                                    console.log('contacts table deleted');

                                    db.messages
                                        .where('owner')
                                        .equals(userInfo.id)
                                        .delete()
                                        .then(function() {
                                            console.log('messages table deleted');

                                            db.participants
                                                .where('owner')
                                                .equals(userInfo.id)
                                                .delete()
                                                .then(function() {
                                                    console.log('participants table deleted');

                                                    db.messageGaps
                                                        .where('owner')
                                                        .equals(userInfo.id)
                                                        .delete()
                                                        .then(function() {
                                                            console.log('messageGaps table deleted');
                                                            cacheDeletingInProgress = false;
                                                            callback && callback();
                                                        });
                                                });
                                        });
                                });
                        })
                        .catch(function(error) {
                            fireEvent('error', {
                                code: error.code,
                                message: error.message,
                                error: error
                            });
                        });
                }
            }
605115
function fetchRowsFromResult(options, statement, context)
{
  var numInterrupts = 0;

  // forward to the result to get a FetchRowsOperation object
  var operation = context.result.fetchRows(options);

  // subscribe to the operation's 'complete' event
  operation.on('complete', function(err, continueCallback)
  {
    // we want to retry if the error is retryable and the
    // result stream hasn't been closed too many times
    if (Errors.isLargeResultSetError(err) && err.response &&
        (err.response.statusCode === 403) &&
        (numInterrupts <
        context.connectionConfig.getResultStreamInterrupts()))
    {
      // increment the interrupt counter
      numInterrupts++;

      // issue a request to fetch the result again
      sendRequestPostExec(context, function(err, body)
      {
        // refresh the result
        context.onStatementRequestComp(err, body);

        // if there was no error, continue from where we got interrupted
        if (!err)
        {
          continueCallback();
        }
      });
    }
    else
    {
      endFetchRows(options, statement, context);
    }
  });
}
1305152
def remove_row(row)
      case
        when row.is_a?(Array)
          location = @rows.index { |row_hash| row_hash.values_at(*@parameters) == row.collect { |value| value.strip } }
        when row.is_a?(Hash)
          location = @rows.index { |row_hash| row_hash == row.each_value { |value| value.strip! } }
        else
          raise(ArgumentError, "Can only remove row from a Hash or an Array but received #{row.class}")
      end

      #todo - remove once Hash rows are no longer supported
      @rows.delete_at(location) if location
      @row_elements.delete_at(location + 1) if location
    end
686905
async def delete(query):
    
    assert isinstance(query, peewee.Delete),\
        ("Error, trying to run delete coroutine"
         "with wrong query class %s" % str(query))

    cursor = await _execute_query_async(query)
    rowcount = cursor.rowcount

    await cursor.release()
    return rowcount
221539
public void performDeletion()
    {
        if(deletionMap == null)
            return;
        else
        {
            PersistenceBroker broker = tx.getBroker();
            Iterator it = deletionMap.values().iterator();
            while(it.hasNext())
            {
                NamedEntry namedEntry = (NamedEntry) it.next();
                broker.delete(namedEntry);
            }
        }
    }
793391
public ApiResponse<DeleteQueueStatisticResponse> deleteQueueStatisticWithHttpInfo(String object) throws ApiException {
        com.squareup.okhttp.Call call = deleteQueueStatisticValidateBeforeCall(object, null, null);
        Type localVarReturnType = new TypeToken<DeleteQueueStatisticResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
344722
int delete(Session session, Table table, RowSetNavigator oldRows) {

        if (table.fkMainConstraints.length == 0) {
            deleteRows(session, table, oldRows);
            oldRows.beforeFirst();

            if (table.hasTrigger(Trigger.DELETE_AFTER)) {
                table.fireAfterTriggers(session, Trigger.DELETE_AFTER,
                                        oldRows);
            }

            return oldRows.getSize();
        }

        HashSet path = session.sessionContext.getConstraintPath();
        HashMappedList tableUpdateList =
            session.sessionContext.getTableUpdateList();

        if (session.database.isReferentialIntegrity()) {
            oldRows.beforeFirst();

            while (oldRows.hasNext()) {
                oldRows.next();

                Row row = oldRows.getCurrentRow();

                path.clear();
                checkCascadeDelete(session, table, tableUpdateList, row,
                                   false, path);
            }
        }

        if (session.database.isReferentialIntegrity()) {
            oldRows.beforeFirst();

            while (oldRows.hasNext()) {
                oldRows.next();

                Row row = oldRows.getCurrentRow();

                path.clear();
                checkCascadeDelete(session, table, tableUpdateList, row, true,
                                   path);
            }
        }

        oldRows.beforeFirst();

        while (oldRows.hasNext()) {
            oldRows.next();

            Row row = oldRows.getCurrentRow();

            if (!row.isDeleted(session)) {
                table.deleteNoRefCheck(session, row);
            }
        }

        for (int i = 0; i < tableUpdateList.size(); i++) {
            Table targetTable = (Table) tableUpdateList.getKey(i);
            HashMappedList updateList =
                (HashMappedList) tableUpdateList.get(i);

            if (updateList.size() > 0) {
                targetTable.updateRowSet(session, updateList, null, true);
                updateList.clear();
            }
        }

        oldRows.beforeFirst();

        if (table.hasTrigger(Trigger.DELETE_AFTER)) {
            table.fireAfterTriggers(session, Trigger.DELETE_AFTER, oldRows);
        }

        path.clear();

        return oldRows.getSize();
    }
705785
protected int onUpdateDeleteEvent()
    {
        if (kunderaQuery.isDeleteUpdate())
        {
            List result = fetch();

            onDeleteOrUpdate(result);
            return result != null ? result.size() : 0;
        }

        return 0;

    }
1345895
public boolean nextIsNull(long currentRow) throws IOException {
    if (present != null) {
      seekToPresentRow(currentRow);
      valuePresent = present.next() == 1;
      if (valuePresent) {
        // Adjust numNonNulls so we know how many non-null values we'll need to skip if skip is
        // called
        numNonNulls++;
      } else {
        if (currentRow == previousRow + 1) {
          // if currentRow = previousRow + 1, and the value is null this is equivalent to going to the
          // next row.  if there's a series of nulls this prevents us from calling skipRows when
          // the next non-null value is fetched
          previousRow++;
        }
      }
    }

    return !valuePresent;
  }
1279118
def delete(self, id):
        """"""
        # url('DataStores', id=ID)
        result = meta.Session.query(DataStore).get(id)
        meta.Session.delete(result)
        meta.Session.commit()

        response.status = 204
        # remove content-type from response headers so that webtest won't get confused
        # http://groups.google.com/group/pylons-discuss/browse_thread/thread/1267650386ae521b
        del response.headers['content-type']
689711
def delete(self, params, args, data):
        # type: (str, dict, dict) -> None
        
        ctx = self._create_context(params, args, data)
        row_id = ctx.get_row_id()

        if row_id is not None:
            return self._delete_one(row_id, ctx)
        else:
            return self._delete_collection(ctx)
262814
public function delete()
    {
        $this->getLogger()->info('Deleting row ID ' . $this->rowId . ' From dataSet ID ' . $this->dataSetId);
        $this->doDelete('/dataset/data/' . $this->dataSetId . $this->rowId);
        
        return true;
    }
1202070
void deleteRow(String storeName, Map<String, AttributeValue> key) {
        String tableName = storeToTableName(storeName);
        m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
        
        Timer timer = new Timer();
        boolean bSuccess = false;
        for (int attempts = 1; !bSuccess; attempts++) {
            try {
                m_ddbClient.deleteItem(tableName, key);
                if (attempts > 1) {
                    m_logger.info("deleteRow() succeeded on attempt #{}", attempts);
                }
                bSuccess = true;
                m_logger.debug("Time to delete table {}, key={}: {}",
                               new Object[]{tableName, DynamoDBService.getDDBKey(key), timer.toString()});
            } catch (ProvisionedThroughputExceededException e) {
                if (attempts >= m_max_commit_attempts) {
                    String errMsg = "All retries exceeded; abandoning deleteRow() for table: " + tableName;
                    m_logger.error(errMsg, e);
                    throw new RuntimeException(errMsg, e);
                }
                m_logger.warn("deleteRow() attempt #{} failed: {}", attempts, e);
                try {
                    Thread.sleep(attempts * m_retry_wait_millis);
                } catch (InterruptedException ex2) {
                    // ignore
                }
            }
        }
    }
910363
function onDelete(results) {
            const response = results ? results[0] : {};
            response.key = key;

            /**
             * If we passed a DataLoader instance, we clear its cache
             */
            if (options.dataloader) {
                options.dataloader.clear(key);
            }

            if (typeof response.indexUpdates !== 'undefined') {
                response.success = response.indexUpdates > 0;
            }

            /**
             * Make sure to delete the cache for this key
             */
            if (_this.__hasCache(options)) {
                return _this.clearCache(key, options.clearQueries)
                    .then(() => response)
                    .catch((err) => {
                        let msg = 'Error while clearing the cache after deleting the entity.';
                        msg += 'The entity has been deleted successfully though. ';
                        msg += 'The cache error has been attached.';
                        const cacheError = new Error(msg);
                        cacheError.__response = response;
                        cacheError.__cacheError = err;
                        throw cacheError;
                    });
            }

            return response;
        }