MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / clone

Function clone

packages/core/fumadb/src/schema/create.ts:637–654  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

635 return this;
636 },
637 clone() {
638 const cloneColumns: Record<string, AnyColumn> = {};
639
640 for (const [k, v] of Object.entries(columns)) {
641 cloneColumns[k] = v.clone();
642 }
643
644 const clone = table(name, cloneColumns as Columns);
645 for (const con of uniqueConstraints) {
646 clone.unique(
647 con.name,
648 con.columns.map((col) => col.ormName)
649 );
650 }
651 clone.policies.push(...policies);
652
653 return clone;
654 },
655 };
656
657 for (const k in columns) {

Callers

nothing calls this directly

Calls 5

schemaFunction · 0.85
pushMethod · 0.80
tableFunction · 0.70
cloneMethod · 0.65
uniqueMethod · 0.65

Tested by

no test coverage detected