list method
Implementation
@override
Stream<String> list({
int batchSize = 100,
String? prefix,
String matchKey = "entry",
PointId? offset,
}) async* {
if (await getCollection() == null) {
return;
}
ScrollResponse r = await points.scroll(
ScrollPoints(
collectionName: namespace,
limit: batchSize,
withPayload: WithPayloadSelector(
include: PayloadIncludeSelector(fields: ["id"]),
),
offset: offset,
),
);
for (final point in r.result) {
final id = _originalIdFromPayload(point.payload, point.id);
if (prefix == null || id.startsWith(prefix)) {
yield id;
}
}
if (r.hasNextPageOffset()) {
yield* list(
batchSize: batchSize,
prefix: prefix,
offset: r.nextPageOffset,
);
}
}