From 26470d85b0ff4411d9da861bf090c3b08cc40f28 Mon Sep 17 00:00:00 2001 From: tjgreen42 <1738591+tjgreen42@users.noreply.github.com> Date: Thu, 18 Jun 2026 19:52:00 +0000 Subject: [PATCH] Fix README quick example: use $batch.* row-set expansion The Quick Example used `id = ANY($batch)`, but a bare $var substitutes only the first column of the first captured row as a scalar, so the generated SQL was `id = ANY(1)` and failed with "op ANY/ALL (array) requires array on right side". Use the $batch.* row-set expansion instead, referencing the captured result as a subquery: `id IN (SELECT id FROM $batch.*)`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e735f442..6a8b1df9 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ The model is intentionally SQL-shaped. If a step needs arbitrary code, a non-HTT -- A durable function that processes data in steps SELECT df.start( 'SELECT id FROM documents WHERE processed = false LIMIT 100' |=> 'batch' - ~> 'UPDATE documents SET processed = true WHERE id = ANY($batch)' + ~> 'UPDATE documents SET processed = true WHERE id IN (SELECT id FROM $batch.*)' ); ```