@@ -213,7 +213,7 @@ func makePyType(req *plugin.GenerateRequest, col *plugin.Column) pyType {
213213 }
214214 }
215215 }
216-
216+
217217 // No override found, use the standard type mapping
218218 typ := pyInnerType (req , col )
219219 return pyType {
@@ -253,9 +253,9 @@ func methodName(name string) string {
253253var pyIdentPattern = regexp .MustCompile ("[^a-zA-Z0-9_]+" )
254254
255255func pyEnumValueName (value string ) string {
256- id := strings .Replace (value , "-" , "_" , - 1 )
257- id = strings .Replace (id , ":" , "_" , - 1 )
258- id = strings .Replace (id , "/" , "_" , - 1 )
256+ id := strings .ReplaceAll (value , "-" , "_" )
257+ id = strings .ReplaceAll (id , ":" , "_" )
258+ id = strings .ReplaceAll (id , "/" , "_" )
259259 id = pyIdentPattern .ReplaceAllString (id , "" )
260260 return strings .ToUpper (id )
261261}
@@ -440,7 +440,7 @@ func buildQueries(conf Config, req *plugin.GenerateRequest, structs []Struct) ([
440440 gq .Args = []QueryValue {{
441441 Emit : true ,
442442 Name : "arg" ,
443- Struct : columnsToStruct (req , query .Name + "Params" , cols ),
443+ Struct : columnsToStruct (req , modelName ( query .Name + "Params" , req . Settings ) , cols ),
444444 }}
445445 } else {
446446 args := make ([]QueryValue , 0 , len (query .Params ))
@@ -495,7 +495,7 @@ func buildQueries(conf Config, req *plugin.GenerateRequest, structs []Struct) ([
495495 Column : c ,
496496 })
497497 }
498- gs = columnsToStruct (req , query .Name + "Row" , columns )
498+ gs = columnsToStruct (req , modelName ( query .Name + "Row" , req . Settings ) , columns )
499499 emit = true
500500 }
501501 gq .Ret = QueryValue {
0 commit comments