Skip to content

Commit 84dfe26

Browse files
authored
fix: pagination for list-object-v1 s3 (#766)
1 parent 33236a0 commit 84dfe26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/storage/database/knex.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ export class StorageKnexDB implements Database {
308308
query.where('name', 'like', `${options.prefix}%`)
309309
}
310310

311+
if (options?.startAfter && !options?.nextToken) {
312+
query.andWhere(knex.raw(`name COLLATE "C" > ?`, [options.startAfter]))
313+
}
314+
311315
if (options?.nextToken) {
312316
const pageOperator = sortOrder === 'asc' ? '>' : '<'
313317
if (sortColumn && options.sortBy?.after) {

0 commit comments

Comments
 (0)