MCPcopy Create free account
hub / github.com/simstudioai/sim / buildTable

Function buildTable

apps/sim/app/api/table/[tableId]/import/route.test.ts:118–139  ·  view source on GitHub ↗
(overrides: Partial<TableDefinition> = {})

Source from the content-addressed store, hash-verified

116}
117
118function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition {
119 return {
120 id: 'tbl_1',
121 name: 'People',
122 description: null,
123 schema: {
124 columns: [
125 { name: 'name', type: 'string', required: true },
126 { name: 'age', type: 'number' },
127 ],
128 },
129 metadata: null,
130 rowCount: 0,
131 maxRows: 100,
132 workspaceId: 'workspace-1',
133 createdBy: 'user-1',
134 archivedAt: null,
135 createdAt: new Date('2024-01-01'),
136 updatedAt: new Date('2024-01-01'),
137 ...overrides,
138 }
139}
140
141/** Additions array the route passed to importAppendRows (2nd positional arg). */
142function appendAdditions(): { name: string; type: string }[] {

Callers 1

route.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected