MCPcopy Index your code
hub / github.com/TanStack/ai / getTableSchema

Function getTableSchema

packages/ai-code-mode/models-eval/database-tools.ts:385–411  ·  view source on GitHub ↗
(table: Table)

Source from the content-addressed store, hash-verified

383}
384
385function getTableSchema(table: Table): Record<string, string> {
386 const schemas: Record<Table, Record<string, string>> = {
387 customers: {
388 id: 'number',
389 name: 'string',
390 email: 'string',
391 city: 'string',
392 joined: 'string (date)',
393 },
394 products: {
395 id: 'number',
396 name: 'string',
397 category: 'string',
398 price: 'number',
399 stock: 'number',
400 },
401 purchases: {
402 id: 'number',
403 customer_id: 'number',
404 product_id: 'number',
405 quantity: 'number',
406 total: 'number',
407 purchased_at: 'string (date)',
408 },
409 }
410 return schemas[table]
411}
412
413function evaluateCondition(
414 row: Record<string, unknown>,

Callers 1

database-tools.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected