Return empty rows collection if query does not have any rows
This commit is contained in:
parent
3167d96cfc
commit
4844270f0b
@ -205,7 +205,10 @@ func (client *Client) query(query string, args ...interface{}) (*Result, error)
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result := Result{Columns: cols}
|
result := Result{
|
||||||
|
Columns: cols,
|
||||||
|
Rows: []Row{},
|
||||||
|
}
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
obj, err := rows.SliceScan()
|
obj, err := rows.SliceScan()
|
||||||
|
File diff suppressed because one or more lines are too long
@ -546,6 +546,9 @@ function buildTableFilters(name, type) {
|
|||||||
if (data.rows.length == 0) {
|
if (data.rows.length == 0) {
|
||||||
$("#pagination .filters").hide();
|
$("#pagination .filters").hide();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$("#pagination .filters").show();
|
||||||
|
}
|
||||||
|
|
||||||
$("#pagination select.column").html("<option value='' selected>Select column</option>");
|
$("#pagination select.column").html("<option value='' selected>Select column</option>");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user