forked from deblan/database-anonymizer
add postgres column type check
add specific method to handle named parameters
This commit is contained in:
parent
2ba8561574
commit
a7cd0634ef
4 changed files with 99 additions and 45 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue