From c3538050abbb485cf1d43f7c870b89f1ad7c2218 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 17 Jan 2025 14:27:31 +0000 Subject: [PATCH] docs(changeset): Add `.scopedSQL(sql => ...)` method to PgSelectStep, PgSelectSingleStep, PgUnionAllStep, PgUnionAllSingleStep; can be used to allow embedding of other _typed_ steps directly into an SQL expression without needing to use `$pgSelect.placeholder(...)` wrapper. Only works with steps that have a `pgCodec: PgCodec` property (typically those coming from PgSelectSingleStep accesses) since otherwise we don't currently know how to cast the value to Postgres. --- .changeset/dull-moles-exercise.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .changeset/dull-moles-exercise.md diff --git a/.changeset/dull-moles-exercise.md b/.changeset/dull-moles-exercise.md new file mode 100644 index 000000000..f6607f163 --- /dev/null +++ b/.changeset/dull-moles-exercise.md @@ -0,0 +1,11 @@ +--- +"@dataplan/pg": patch +--- + +Add `.scopedSQL(sql => ...)` method to PgSelectStep, PgSelectSingleStep, +PgUnionAllStep, PgUnionAllSingleStep; can be used to allow embedding of other +_typed_ steps directly into an SQL expression without needing to use +`$pgSelect.placeholder(...)` wrapper. Only works with steps that have a +`pgCodec: PgCodec` property (typically those coming from PgSelectSingleStep +accesses) since otherwise we don't currently know how to cast the value to +Postgres.