(ctx context.Context, offset, limit *int64, sort, order *string, after *string, additional additional.Properties, tenant string, )
| 161 | } |
| 162 | |
| 163 | func (m *Manager) getObjectsFromRepo(ctx context.Context, |
| 164 | offset, limit *int64, sort, order *string, after *string, |
| 165 | additional additional.Properties, tenant string, |
| 166 | ) ([]*models.Object, error) { |
| 167 | smartOffset, smartLimit, err := m.localOffsetLimit(offset, limit) |
| 168 | if err != nil { |
| 169 | return nil, NewErrInternal("list objects: %v", err) |
| 170 | } |
| 171 | if after != nil { |
| 172 | return nil, NewErrInternal("list objects: after parameter not allowed, cursor must be specific to one class, set class query param") |
| 173 | } |
| 174 | res, err := m.vectorRepo.ObjectSearch(ctx, smartOffset, smartLimit, |
| 175 | nil, m.getSort(sort, order), additional, tenant) |
| 176 | if err != nil { |
| 177 | return nil, NewErrInternal("list objects: %v", err) |
| 178 | } |
| 179 | |
| 180 | if m.modulesProvider != nil { |
| 181 | res, err = m.modulesProvider.ListObjectsAdditionalExtend(ctx, res, additional.ModuleParams) |
| 182 | if err != nil { |
| 183 | return nil, NewErrInternal("list extend: %v", err) |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | if additional.Vector { |
| 188 | m.trackUsageList(res) |
| 189 | } |
| 190 | |
| 191 | return res.ObjectsWithVector(additional.Vector), nil |
| 192 | } |
| 193 | |
| 194 | func (m *Manager) getSort(sort, order *string) []filters.Sort { |
| 195 | if sort != nil { |
no test coverage detected