mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix orderBy
This commit is contained in:
@@ -49,7 +49,7 @@ export class BasePropertyRepo {
|
||||
.selectFrom('baseProperties')
|
||||
.select('position')
|
||||
.where('baseId', '=', baseId)
|
||||
.orderBy(sql`position COLLATE "C"`, sql`DESC`)
|
||||
.orderBy(sql`position COLLATE "C"`, 'desc')
|
||||
.limit(1)
|
||||
.executeTakeFirst();
|
||||
return result?.position ?? null;
|
||||
|
||||
@@ -124,7 +124,7 @@ export class BaseRowRepo {
|
||||
.where('baseId', '=', baseId)
|
||||
.where('workspaceId', '=', opts.workspaceId)
|
||||
.where('deletedAt', 'is', null)
|
||||
.orderBy(sql`position COLLATE "C"`, sql`DESC`)
|
||||
.orderBy(sql`position COLLATE "C"`, 'desc')
|
||||
.limit(1)
|
||||
.executeTakeFirst();
|
||||
return result?.position ?? null;
|
||||
|
||||
@@ -67,7 +67,7 @@ export class BaseViewRepo {
|
||||
.select('position')
|
||||
.where('baseId', '=', baseId)
|
||||
.where('workspaceId', '=', opts.workspaceId)
|
||||
.orderBy(sql`position COLLATE "C"`, sql`DESC`)
|
||||
.orderBy(sql`position COLLATE "C"`, 'desc')
|
||||
.limit(1)
|
||||
.executeTakeFirst();
|
||||
return result?.position ?? null;
|
||||
|
||||
Reference in New Issue
Block a user