1
This commit is contained in:
parent
a55bc81428
commit
7685c13942
@ -146,12 +146,12 @@ func DataSetStreamPageQuery(dataSet []interface{},
|
|||||||
pagination.NextCursor = cursor + 1
|
pagination.NextCursor = cursor + 1
|
||||||
pagination.Remaining = 1
|
pagination.Remaining = 1
|
||||||
}
|
}
|
||||||
pagination.PreviousCursor = cursor
|
pagination.PreviousCursor = q5.Max(1, cursor - 1)
|
||||||
pagination.Count = int32(int64(len(dataSetCopy)) - int64(pageSize) * cursor)
|
pagination.Count = int32(int64(len(dataSetCopy)) - int64(pageSize) * (cursor - 1))
|
||||||
if pagination.Count < 0 {
|
if pagination.Count < 0 {
|
||||||
pagination.Count = 0
|
pagination.Count = 0
|
||||||
} else {
|
} else {
|
||||||
pagination.Count = q5.Max(pageSize, pagination.Count)
|
pagination.Count = q5.Min(pageSize, pagination.Count)
|
||||||
}
|
}
|
||||||
pagination.TotalCount = int32(len(dataSetCopy))
|
pagination.TotalCount = int32(len(dataSetCopy))
|
||||||
queryCb(&pagination)
|
queryCb(&pagination)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user