Refactored if-else in WhereClauseRepeated

This commit is contained in:
Sergey Kurt 2017-03-18 15:32:39 +03:00
parent f3f8074833
commit 21917fcfc6

View file

@ -533,10 +533,9 @@ func WhereClauseRepeated(lq, rq string, start int, cols []string, count int) str
buf.WriteString(") OR (") buf.WriteString(") OR (")
} }
startIndex = 0
if start > 0 { if start > 0 {
startIndex = start + i*len(cols) startIndex = start + i*len(cols)
} else {
startIndex = 0
} }
buf.WriteString(WhereClause(lq, rq, startIndex, cols)) buf.WriteString(WhereClause(lq, rq, startIndex, cols))