MCPcopy
hub / github.com/drizzle-team/drizzle-orm / resolveColumns

Function resolveColumns

drizzle-kit/src/simulator.ts:144–157  ·  view source on GitHub ↗
(tableName: string, added: T[], removed: T[])

Source from the content-addressed store, hash-verified

142columnsHandlers.push(new DryRunColumnsHandler());
143
144export const resolveColumns = <T extends Named>(tableName: string, added: T[], removed: T[]) => {
145 const handler = columnsHandlers.filter((it) => {
146 return it.can(tableName, added, removed);
147 })[0];
148
149 if (!handler) {
150 console.log('added', added.map((it) => it.name).join());
151 console.log('removed', removed.map((it) => it.name).join());
152 throw new Error('No columns handler for table: ' + tableName);
153 }
154
155 console.log(`${tableName} columns simluated by ${handler.constructor.name}`);
156 return handler.handle(tableName, added, removed);
157};

Callers

nothing calls this directly

Calls 2

canMethod · 0.65
handleMethod · 0.65

Tested by

no test coverage detected