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

Function buildTable

apps/sim/app/api/table/[tableId]/export/route.test.ts:30–50  ·  view source on GitHub ↗

Table with an id-native column whose stable id (`col_email`) differs from its display name.

()

Source from the content-addressed store, hash-verified

28
29/** Table with an id-native column whose stable id (`col_email`) differs from its display name. */
30function buildTable(): TableDefinition {
31 return {
32 id: 'tbl_1',
33 name: 'People',
34 description: null,
35 schema: {
36 columns: [
37 { id: 'col_email', name: 'email', type: 'string' },
38 { name: 'legacy', type: 'string' }, // legacy: id == name
39 ],
40 },
41 metadata: null,
42 rowCount: 1,
43 maxRows: 100,
44 workspaceId: 'workspace-1',
45 createdBy: 'user-1',
46 archivedAt: null,
47 createdAt: new Date('2024-01-01'),
48 updatedAt: new Date('2024-01-01'),
49 }
50}
51
52function callGet(format: string) {
53 const req = new NextRequest(`http://localhost:3000/api/table/tbl_1/export?format=${format}`, {

Callers 1

route.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected