add postgres column type check

add specific method to handle named parameters
This commit is contained in:
Simon Vieille 2024-04-01 12:30:45 +02:00
commit a7cd0634ef
Signed by: deblan
GPG key ID: 579388D585F70417
4 changed files with 99 additions and 45 deletions

View file

@ -13,3 +13,13 @@ func TestEscapeTable(t *testing.T) {
t.Fatalf("TestEscapeTable: postgres check failed")
}
}
func TestGetNamedParameter(t *testing.T) {
if GetNamedParameter("mysql", "foo", 1) != "foo=?" {
t.Fatalf("TestGetNamedParameter: mysql check failed")
}
if GetNamedParameter("postgres", "foo", 1) != "foo=$1" {
t.Fatalf("TestGetNamedParameter: postgres check failed")
}
}