From 54faa1515156a901de5b54c7020f0467b4f750c7 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Tue, 13 Feb 2024 21:54:53 +0200 Subject: [PATCH] Additional test for $nr parameters --- test/options/paramTypes.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/options/paramTypes.test.ts b/test/options/paramTypes.test.ts index 8d2e9bf..c3e2b72 100644 --- a/test/options/paramTypes.test.ts +++ b/test/options/paramTypes.test.ts @@ -19,6 +19,12 @@ describe("sqlParamTypes option", () => { }); }); + it(`indexed parameters: $nr`, async () => { + await test(`SELECT * FROM tbl WHERE x = $1 AND y = $2`, { + sqlParamTypes: ["$nr"], + }); + }); + it(`named parameters: :name`, async () => { await test(`SELECT * FROM tbl WHERE x = :foo AND y = :bar`, { sqlParamTypes: [":name"],