Table with an id-native column whose stable id (`col_email`) differs from its display name.
()
| 28 | |
| 29 | /** Table with an id-native column whose stable id (`col_email`) differs from its display name. */ |
| 30 | function 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 | |
| 52 | function callGet(format: string) { |
| 53 | const req = new NextRequest(`http://localhost:3000/api/table/tbl_1/export?format=${format}`, { |