class NoSE::Backend::FileBackend::DeleteStatementStep

Delete data from an index on the backend

Public Instance Methods

process(results) click to toggle source

Remove rows matching the results from the dataset

# File lib/nose/backend/file.rb, line 172
def process(results)
  # Loop over all rows
  @client[index.key].reject! do |row|
    # Check against all results
    results.any? do |result|
      # If all fields match, drop the row
      result.all? do |field, value|
        row[field] == value
      end
    end
  end
end