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

Function unique

packages/core/fumadb/src/schema/create.ts:619–632  ·  view source on GitHub ↗
(name, columns)

Source from the content-addressed store, hash-verified

617 return idCol!;
618 },
619 unique(name, columns) {
620 uniqueConstraints.push({
621 name,
622 columns: columns.map((name) => {
623 const column = this.columns[name];
624 if (!column)
625 throw new Error(`Unknown column name ${name.toString()}`);
626
627 return column;
628 }),
629 });
630
631 return this;
632 },
633 policy(policy) {
634 policies.push(policy as StoredTablePolicy);
635 return this;

Callers

nothing calls this directly

Calls 2

pushMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected