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

Function buildTable

apps/sim/lib/copilot/request/tools/tables.test.ts:36–57  ·  view source on GitHub ↗
(overrides: Partial<TableDefinition> = {})

Source from the content-addressed store, hash-verified

34import type { ExecutionContext } from '@/lib/copilot/request/types'
35
36function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition {
37 return {
38 id: 'tbl_1',
39 name: 'People',
40 description: null,
41 schema: {
42 columns: [
43 { id: 'col_name', name: 'name', type: 'string' },
44 { id: 'col_age', name: 'age', type: 'number' },
45 ],
46 },
47 metadata: null,
48 rowCount: 0,
49 maxRows: 100,
50 workspaceId: 'workspace-1',
51 createdBy: 'user-1',
52 archivedAt: null,
53 createdAt: new Date('2024-01-01'),
54 updatedAt: new Date('2024-01-01'),
55 ...overrides,
56 } as TableDefinition
57}
58
59function buildContext(overrides: Partial<ExecutionContext> = {}): ExecutionContext {
60 return {

Callers 1

tables.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected