From 41291f07b393917b429b84b8b0697ddec019498d Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 2 Dec 2025 23:02:41 +0000 Subject: [PATCH] Pass function parameters into string formatting. --- db/prepared.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/prepared.go b/db/prepared.go index 43ed1fb5..727662c7 100644 --- a/db/prepared.go +++ b/db/prepared.go @@ -67,7 +67,8 @@ func TestPreparedQuery(ctx context.Context) error { type Skn struct { Result int } - query := psql.RawQuery("EXECUTE test_function(4)") + q := fmt.Sprintf("EXECUTE test_function(%d)", 4) + query := psql.RawQuery(q) result, err := bob.One[Skn](ctx, PGInstance.BobDB, query, scan.StructMapper[Skn]()) if err != nil { return fmt.Errorf("Failed to exectue test function: %w", err)