From 56b0be33d03c80933969cb29d21b2e1bb8f656ad Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Mon, 15 Jun 2026 22:20:53 -0400 Subject: [PATCH 1/6] fragment splice cursor example --- lib/ecto/query/api.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ecto/query/api.ex b/lib/ecto/query/api.ex index a9ffbcfbe2..beced752f9 100644 --- a/lib/ecto/query/api.ex +++ b/lib/ecto/query/api.ex @@ -554,6 +554,18 @@ defmodule Ecto.Query.API do from p in Post, select: concat_ws(":", [p.author, ^year, p.title]) from s in Sequences, select: concat_ws(".", ["public", s.relname]) + Or you may want to create re-usable macros for [Postgres's row constructor + comparison syntax](https://www.postgresql.org/docs/current/functions-comparisons.html#ROW-WISE-COMPARISON) + to support multi-column cursor-based pagination: + + defmacro row_gt(columns, values) do + quote do + fragment("(?) >= (?)", splice(unquote(columns)), splice(unquote(values))) + end + end + + from(p in Post, where: row_gt([p.visits, p.id], [^lower_visits, ^lower_id])) + You may nest others splices and fragment modifiers such as `identifier/1` and `constant/1` inside of compile-time splices From e09ec5d60c58f387fb8d2079213c000fadc65a07 Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 16 Jun 2026 07:41:07 -0400 Subject: [PATCH 2/6] update image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e90caead3f..c55ef4a070 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: fail-fast: false matrix: elixirbase: - - "1.17.3-erlang-27.1-alpine-3.17.9" + - "1.17.3-erlang-27.2-alpine-3.17.9" - "1.17.3-erlang-25.0.4-alpine-3.17.9" - "1.15.6-erlang-24.3.4.9-alpine-3.20.9" steps: From e55e4caa09dffb251fe3580a51d5ca5f5f3ad2dc Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 16 Jun 2026 07:43:13 -0400 Subject: [PATCH 3/6] update other image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c55ef4a070..4172168983 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - elixir: "1.18.1" otp: "27.2" - elixir: "1.17.3" - otp: "27.1" + otp: "27.2" - elixir: "1.17.3" otp: "25.0.4" - elixir: "1.14.5" From 28429947657928e68d324e6a6053fee0beaec7ac Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 16 Jun 2026 07:50:32 -0400 Subject: [PATCH 4/6] update alpine --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4172168983..5e9557c0a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: fail-fast: false matrix: elixirbase: - - "1.17.3-erlang-27.2-alpine-3.17.9" - - "1.17.3-erlang-25.0.4-alpine-3.17.9" + - "1.17.3-erlang-27.2-alpine-3.20.9" + - "1.17.3-erlang-25.0.4-alpine-3.20.9" - "1.15.6-erlang-24.3.4.9-alpine-3.20.9" steps: - uses: earthly/actions-setup@v1 From 8439399c8e168076dd1f68319d666d1bd826a7d8 Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 16 Jun 2026 07:53:02 -0400 Subject: [PATCH 5/6] update alpine --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e9557c0a5..afeb42c129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: fail-fast: false matrix: elixirbase: - - "1.17.3-erlang-27.2-alpine-3.20.9" - - "1.17.3-erlang-25.0.4-alpine-3.20.9" + - "1.17.3-erlang-27.2-alpine-3.18.4" + - "1.17.3-erlang-25.0.4-alpine-3.18.4" - "1.15.6-erlang-24.3.4.9-alpine-3.20.9" steps: - uses: earthly/actions-setup@v1 From 5223d3fff808f155e91f7601c10418a8cea01b5d Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 16 Jun 2026 07:55:16 -0400 Subject: [PATCH 6/6] update alpine --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afeb42c129..c9e689b1af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,8 @@ jobs: fail-fast: false matrix: elixirbase: - - "1.17.3-erlang-27.2-alpine-3.18.4" - - "1.17.3-erlang-25.0.4-alpine-3.18.4" + - "1.17.3-erlang-27.1-alpine-3.17.9" + - "1.17.3-erlang-25.0.4-alpine-3.17.9" - "1.15.6-erlang-24.3.4.9-alpine-3.20.9" steps: - uses: earthly/actions-setup@v1