@@ -219,9 +219,9 @@ func methodName(name string) string {
219219var pyIdentPattern = regexp .MustCompile ("[^a-zA-Z0-9_]+" )
220220
221221func pyEnumValueName (value string ) string {
222- id := strings .Replace (value , "-" , "_" , - 1 )
223- id = strings .Replace (id , ":" , "_" , - 1 )
224- id = strings .Replace (id , "/" , "_" , - 1 )
222+ id := strings .ReplaceAll (value , "-" , "_" )
223+ id = strings .ReplaceAll (id , ":" , "_" )
224+ id = strings .ReplaceAll (id , "/" , "_" )
225225 id = pyIdentPattern .ReplaceAllString (id , "" )
226226 return strings .ToUpper (id )
227227}
@@ -406,7 +406,7 @@ func buildQueries(conf Config, req *plugin.GenerateRequest, structs []Struct) ([
406406 gq .Args = []QueryValue {{
407407 Emit : true ,
408408 Name : "arg" ,
409- Struct : columnsToStruct (req , query .Name + "Params" , cols ),
409+ Struct : columnsToStruct (req , modelName ( query .Name + "Params" , req . Settings ) , cols ),
410410 }}
411411 } else {
412412 args := make ([]QueryValue , 0 , len (query .Params ))
@@ -461,7 +461,7 @@ func buildQueries(conf Config, req *plugin.GenerateRequest, structs []Struct) ([
461461 Column : c ,
462462 })
463463 }
464- gs = columnsToStruct (req , query .Name + "Row" , columns )
464+ gs = columnsToStruct (req , modelName ( query .Name + "Row" , req . Settings ) , columns )
465465 emit = true
466466 }
467467 gq .Ret = QueryValue {
0 commit comments