MCPcopy
hub / github.com/drawdb-io/drawdb / getFkColumnNames

Function getFkColumnNames

src/utils/exportSQL/shared.js:6–15  ·  view source on GitHub ↗
(relationship, startTable, endTable)

Source from the content-addressed store, hash-verified

4import { dbToTypes } from "../../data/datatypes";
5
6export function getFkColumnNames(relationship, startTable, endTable) {
7 const pairs = getRelationshipFields(relationship);
8 const startColumns = pairs.map(
9 (p) => startTable?.fields.find((f) => f.id === p.startFieldId)?.name,
10 );
11 const endColumns = pairs.map(
12 (p) => endTable?.fields.find((f) => f.id === p.endFieldId)?.name,
13 );
14 return { startColumns, endColumns };
15}
16
17export function parseDefault(field, database = DB.GENERIC) {
18 if (

Callers 11

toPostgresFunction · 0.90
jsonToMySQLFunction · 0.90
jsonToPostgreSQLFunction · 0.90
jsonToMariaDBFunction · 0.90
jsonToSQLServerFunction · 0.90
jsonToOracleSQLFunction · 0.90
toMariaDBFunction · 0.90
toMSSQLFunction · 0.90
toMySQLFunction · 0.90
toOracleSQLFunction · 0.90
getInlineFKFunction · 0.85

Calls 1

getRelationshipFieldsFunction · 0.90

Tested by

no test coverage detected