Pass function parameters into string formatting.
This commit is contained in:
parent
b488730177
commit
41291f07b3
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue