gitlab-org--gitlab-foss/lib/api
Rémy Coutable 50124864e3 Merge branch 'artifacts-from-ref-and-build-name-api' into 'master'
Simpler two queries than one JOIN with subquery

This is a follow up from !5347

Originally it was:

``` ruby
pipeline = pipelines.latest_successful_for(ref)
builds.where(pipeline: pipeline).latest.with_artifacts
```

However MySQL would complain that we can't use `IN` against a subquery which has `LIMIT`. Using `INNER JOIN` would be a workaround, however, doing that is too complicated in current version of Rails.

So let's just use two queries in this case.

Closes #14419

See merge request !5388
2016-07-22 08:46:04 +00:00
..
api.rb
api_guard.rb
award_emoji.rb
branches.rb
builds.rb Also fix the URL in the comment 2016-07-21 19:26:58 +08:00
commit_statuses.rb
commits.rb
deploy_keys.rb
entities.rb Merge branch 'email-domain-blacklist' into 'master' 2016-07-20 20:26:00 +00:00
files.rb
group_members.rb
groups.rb
helpers.rb
internal.rb
issues.rb
keys.rb
labels.rb
license_templates.rb
merge_requests.rb
milestones.rb
namespaces.rb
notes.rb
project_hooks.rb
project_members.rb
project_snippets.rb
projects.rb
repositories.rb
runners.rb
services.rb
session.rb
settings.rb
sidekiq_metrics.rb
subscriptions.rb
system_hooks.rb
tags.rb
templates.rb
todos.rb
triggers.rb
users.rb
variables.rb