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

Function buildTable

apps/sim/app/api/table/[tableId]/export-async/route.test.ts:37–53  ·  view source on GitHub ↗
(overrides: Partial<TableDefinition> = {})

Source from the content-addressed store, hash-verified

35import { POST } from '@/app/api/table/[tableId]/export-async/route'
36
37function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition {
38 return {
39 id: 'tbl_1',
40 name: 'People',
41 description: null,
42 schema: { columns: [{ name: 'name', type: 'string' }] },
43 metadata: null,
44 rowCount: 50000,
45 maxRows: 1_000_000,
46 workspaceId: 'workspace-1',
47 createdBy: 'user-1',
48 archivedAt: null,
49 createdAt: new Date(),
50 updatedAt: new Date(),
51 ...overrides,
52 }
53}
54
55function makeRequest(body: unknown, tableId = 'tbl_1') {
56 const req = new NextRequest(`http://localhost:3000/api/table/${tableId}/export-async`, {

Callers 1

route.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected