NamedArgs allows underscore
This commit is contained in:
@@ -36,6 +36,12 @@ func TestNamedArgsRewriteQuery(t *testing.T) {
|
||||
expectedSQL: "select $1::int, $2::text",
|
||||
expectedArgs: []any{int32(42), "foo"},
|
||||
},
|
||||
{
|
||||
sql: "select @Abc::int, @b_4::text",
|
||||
namedArgs: pgx.NamedArgs{"Abc": int32(42), "b_4": "foo"},
|
||||
expectedSQL: "select $1::int, $2::text",
|
||||
expectedArgs: []any{int32(42), "foo"},
|
||||
},
|
||||
{
|
||||
sql: "at end @",
|
||||
namedArgs: pgx.NamedArgs{"a": int32(42), "b": "foo"},
|
||||
|
||||
Reference in New Issue
Block a user