File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -632,22 +632,22 @@ defmodule Ecto.Query do
632632
633633 We can write it as a join expression:
634634
635- set = from(p in Post,
635+ subset = from(p in Post,
636636 where: p.synced == false and
637637 (is_nil(p.sync_started_at) or p.sync_started_at < ^min_sync_started_at),
638638 limit: ^batch_size
639639 )
640640
641641 Repo.update_all(
642- from(p in Post, join: s in subquery(set ), on: s.id == p.id),
642+ from(p in Post, join: s in subquery(subset ), on: s.id == p.id),
643643 set: [sync_started_at: NaiveDateTime.utc_now()]
644644 )
645645
646646 Or as a `where` condition:
647647
648- subset = from(p in subset, select: p.id)
648+ subset_ids = from(p in subset, select: p.id)
649649 Repo.update_all(
650- from(p in Post, where: p.id in subquery(subset )),
650+ from(p in Post, where: p.id in subquery(subset_ids )),
651651 set: [sync_started_at: NaiveDateTime.utc_now()]
652652 )
653653
You can’t perform that action at this time.
0 commit comments