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