sort split on empty string terurnt array of one empty string
This commit is contained in:
parent
523f25edde
commit
cac8a47bbe
2
pg.go
2
pg.go
@ -232,7 +232,7 @@ func (t *TableInfo) buildSelect(key string, columns []string, restriction string
|
|||||||
if restriction != "" {
|
if restriction != "" {
|
||||||
query += " where " + restriction
|
query += " where " + restriction
|
||||||
}
|
}
|
||||||
if len(sortkeys) > 0 {
|
if len(sortkeys) > 0 && len(sortkeys[0]) > 0 {
|
||||||
query += " order by " + strings.Join(sortkeys, ",")
|
query += " order by " + strings.Join(sortkeys, ",")
|
||||||
}
|
}
|
||||||
if len(dir) > 0 {
|
if len(dir) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user