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

Function limit

apps/sim/app/api/knowledge/utils.test.ts:102–116  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

100 where() {
101 return {
102 limit(n: number) {
103 const tableName = tableNameFor(table)
104
105 if (tableName === 'knowledge_base') {
106 return Promise.resolve(kbRows.slice(0, n))
107 }
108 if (tableName === 'document') {
109 return Promise.resolve(docRows.slice(0, n))
110 }
111 if (tableName === 'embedding') {
112 return Promise.resolve(chunkRows.slice(0, n))
113 }
114
115 return Promise.resolve([])
116 },
117 }
118 },
119 innerJoin() {

Callers

nothing calls this directly

Calls 2

tableNameForFunction · 0.85
resolveMethod · 0.65

Tested by

no test coverage detected