(pageSize, margin int, multiply int, keys []int)
| 173 | } |
| 174 | |
| 175 | func (f *fileClient) batchInConditionEntityID(pageSize, margin int, multiply int, keys []int) ([]predicate.Entity, [][]int) { |
| 176 | pageSize = capPageSize(f.maxSQlParam, pageSize, margin) |
| 177 | chunks := lo.Chunk(keys, max(pageSize/multiply, 1)) |
| 178 | return lo.Map(chunks, func(item []int, index int) predicate.Entity { |
| 179 | return entity.IDIn(item...) |
| 180 | }), chunks |
| 181 | } |
| 182 | |
| 183 | // cursorPagination perform pagination with cursor, which is faster than fast pagination, but less flexible. |
| 184 | func (f *fileClient) cursorPagination(ctx context.Context, query *ent.FileQuery, |
no test coverage detected