Conversation
|
|
||
| func (mc *multiColumnInClause) WriteTo(w QueryWriter, vs map[string]interface{}) error { | ||
| if _, ok := vs[mc.k]; !ok || len(mc.ms) == 0 { | ||
| io.WriteString(w, "1=0") |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Error return value of io.WriteString is not checked (errcheck)
| return ErrMissingKey{b} | ||
| } | ||
|
|
||
| io.WriteString(w, w.RedeemVariable(vv.Interface())) |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Error return value of io.WriteString is not checked (errcheck)
| io.WriteString(w, w.RedeemVariable(vv.Interface())) | ||
|
|
||
| if j < len(bindings)-1 { | ||
| io.WriteString(w, ", ") |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Error return value of io.WriteString is not checked (errcheck)
| } | ||
|
|
||
| if v.Len() == 0 { | ||
| io.WriteString(w, "1=0") |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Error return value of io.WriteString is not checked (errcheck)
| } | ||
|
|
||
| if i < v.Len()-1 { | ||
| io.WriteString(w, ", ") |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Error return value of io.WriteString is not checked (errcheck)
| func (mc *multiColumnInClause) WriteTo(w QueryWriter, vs map[string]interface{}) error { | ||
| if _, ok := vs[mc.k]; !ok || len(mc.ms) == 0 { | ||
| io.WriteString(w, "1=0") | ||
| return nil |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
| } | ||
|
|
||
| fmt.Fprint(w, ")") | ||
| return nil |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
|
|
||
| if v.Len() == 0 { | ||
| io.WriteString(w, "1=0") | ||
| return nil |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
| } | ||
|
|
||
| io.WriteString(w, ")") | ||
| return nil |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
| func writeInClause(w QueryWriter, vv interface{}, k string) error { | ||
| return writeInValues(w, vv, k, func(w QueryWriter, elem interface{}) error { | ||
| io.WriteString(w, w.RedeemVariable(elem)) | ||
| return nil |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
What does this PR do?
In our internal code base we have a lot of queries that look like:
For our current version of postgres it suffers from pretty poor performances.
This new predicate clause, should make it easy to write query like:
What are the observable changes?
Good PR checklist
Additional Notes