MCPcopy Index your code
hub / github.com/simstudioai/sim / getOrderByColumn

Function getOrderByColumn

apps/sim/lib/knowledge/documents/service.ts:1090–1109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1088 const hasMore = offset + limit < total
1089
1090 const getOrderByColumn = () => {
1091 switch (sortBy) {
1092 case 'filename':
1093 return document.filename
1094 case 'fileSize':
1095 return document.fileSize
1096 case 'tokenCount':
1097 return document.tokenCount
1098 case 'chunkCount':
1099 return document.chunkCount
1100 case 'uploadedAt':
1101 return document.uploadedAt
1102 case 'processingStatus':
1103 return document.processingStatus
1104 case 'enabled':
1105 return document.enabled
1106 default:
1107 return document.uploadedAt
1108 }
1109 }
1110
1111 const primaryOrderBy = sortOrder === 'asc' ? asc(getOrderByColumn()) : desc(getOrderByColumn())
1112 const secondaryOrderBy =

Callers 1

getDocumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected