372 return "&" + p.Encode()
373}
374
375func (param Parameters) Statement(wheres, table, delimiter, delimiter2 string, whereArgs []interface{}, columns, existKeys []string,376 filterProcess func(string, string, string) string) (string, []interface{}, []string) {
377 var multiKey = make(map[string]uint8)
378 for key, value := range param.Fields {
359 return "?" + p.Encode()
360}
361
362func (param Parameters) GetFixedParamStrWithoutSort() string {363 p := make(url.Values)
364 p.Add(PageSize, param.PageSize)
365 for key, value := range param.Fields {
348 return p
349}
350
351func (param Parameters) GetFixedParamStrWithoutColumnsAndPage() string {352 p := make(url.Values)
353 p.Add(Sort, param.SortField)
354 p.Add(PageSize, param.PageSize)
334 return "?" + p.Encode()
335}
336
337func (param Parameters) GetFixedParamStr() url.Values {338 p := make(url.Values)
339 p.Add(Sort, param.SortField)
340 p.Add(PageSize, param.PageSize)
323 return "?" + p.Encode()
324}
325
326func (param Parameters) GetNextPageRouteParamStr(cache ...bool) string {327 var p url.Values
328 if len(cache) > 0 && cache[0] {
329 p = param.GetFixedParamStrFromCache()
(Go's FAQ)[https://go.dev/doc/faq#methodsonvaluesorpointers] recommends that method receivers should be consistent. If some of the methods of the type must have pointer receivers, the rest should too, so the method set is consistent regardless of how the type is used. This is because value and pointer receivers have different method sets.
package main
type foo struct {
a int
}
func (f foo) a() {}
func (f *foo) b() {
f.a = 10
}
package main
type foo struct {
a int
}
func (f *foo) a() {}
func (f *foo) b() {
f.a = 10
}