Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update objects.rb to pass tenant to batch_delete as param #45

Merged
merged 2 commits into from
Feb 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/weaviate/objects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,13 @@ def batch_delete(
where:,
consistency_level: nil,
output: nil,
dry_run: nil
dry_run: nil,
tenant: nil
)
path = "batch/#{PATH}"

unless consistency_level.nil?
validate_consistency_level!(consistency_level)

path << "?consistency_level=#{consistency_level.to_s.upcase}"
end

response = client.connection.delete(path) do |req|
Expand All @@ -181,6 +180,8 @@ def batch_delete(
}
req.body["output"] = output unless output.nil?
req.body["dryRun"] = dry_run unless dry_run.nil?
req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
req.params["tenant"] = tenant unless tenant.nil?
end

response.body
Expand Down