File tree 1 file changed +24
-2
lines changed
1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 21
21
queries : " postgresql/query.sql"
22
22
engine : " postgresql"
23
23
gen :
24
- go :
24
+ go :
25
25
package : " authors"
26
26
out : " postgresql"
27
27
rename :
@@ -93,7 +93,29 @@ type Writer struct {
93
93
}
94
94
` ` `
95
95
96
+ # # Parameter Structure Names
97
+
98
+ It is possible to rename the arguments a generated function would use.
99
+ For example, if you had a generated function called `FindWriter`
100
+ which used a generated name of `FindWriterParams`, you can choose to rename
101
+ this :
102
+
103
+ ` ` ` yaml
104
+ version: "2"
105
+ sql:
106
+ - engine: postgresql
107
+ queries: query.sql
108
+ schema: query.sql
109
+ overrides:
110
+ go:
111
+ rename:
112
+ FindWriterParams: SomeOtherNameParams
113
+ ` ` `
114
+
115
+ The target name must be unique, and even if multiple structures would
116
+ have the same fields, there will be a conflict.
117
+
96
118
# # Limitations
97
119
98
120
Rename mappings apply to an entire package. Therefore, a column named `foo` and
99
- a table name `foo` can't map to different rename values.
121
+ a table name `foo` can't map to different rename values.
You can’t perform that action at this time.
0 commit comments