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

Function buildRow

apps/sim/lib/table/rows/service.ts:270–280  ·  view source on GitHub ↗
(rowData: RowData, position: number, orderKey: string)

Source from the content-addressed store, hash-verified

268 await setTableTxTimeouts(trx, { statementMs: 60_000 })
269
270 const buildRow = (rowData: RowData, position: number, orderKey: string) => ({
271 id: `row_${generateId().replace(/-/g, '')}`,
272 tableId: data.tableId,
273 workspaceId: data.workspaceId,
274 data: rowData,
275 position,
276 orderKey,
277 createdAt: now,
278 updatedAt: now,
279 ...(data.userId ? { createdBy: data.userId } : {}),
280 })
281
282 await acquireRowOrderLock(trx, data.tableId)
283 const fractionalOrdering = await isFeatureEnabled('tables-fractional-ordering')

Callers 1

batchInsertRowsWithTxFunction · 0.85

Calls 2

generateIdFunction · 0.90
replaceMethod · 0.65

Tested by

no test coverage detected