chore(scripts/dbgen): only add arg validation for dbfake (#8578)

This commit is contained in:
Mathias Fredriksson 2023-07-18 20:26:03 +03:00 committed by GitHub
parent 98164f687e
commit 2fae9b0a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -220,7 +220,9 @@ func orderAndStubDatabaseFunctions(filePath, receiver, structName string, stub f
for _, fn := range funcs {
var bodyStmts []dst.Stmt
if len(fn.Func.Params.List) == 2 && fn.Func.Params.List[1].Names[0].Name == "arg" {
// Add input validation, only relevant for dbfake.
if strings.Contains(filePath, "dbfake") && len(fn.Func.Params.List) == 2 && fn.Func.Params.List[1].Names[0].Name == "arg" {
/*
err := validateDatabaseType(arg)
if err != nil {