MCPcopy Create free account
hub / github.com/dataform-co/dataform / set

Method set

core/utils.ts:605–627  ·  view source on GitHub ↗
(actionTarget: dataform.ITarget, value: T)

Source from the content-addressed store, hash-verified

603 }
604
605 public set(actionTarget: dataform.ITarget, value: T) {
606 this.setByNameLevel(this.byName, actionTarget.name, value);
607
608 if (!!actionTarget.schema) {
609 this.setBySchemaLevel(this.bySchemaAndName, actionTarget, value);
610 }
611
612 if (!!actionTarget.database) {
613 if (!this.byDatabaseAndName.has(actionTarget.database)) {
614 this.byDatabaseAndName.set(actionTarget.database, new Map());
615 }
616 const forDatabaseNoSchema = this.byDatabaseAndName.get(actionTarget.database);
617 this.setByNameLevel(forDatabaseNoSchema, actionTarget.name, value);
618
619 if (!!actionTarget.schema) {
620 if (!this.byDatabaseSchemaAndName.has(actionTarget.database)) {
621 this.byDatabaseSchemaAndName.set(actionTarget.database, new Map());
622 }
623 const forDatabase = this.byDatabaseSchemaAndName.get(actionTarget.database);
624 this.setBySchemaLevel(forDatabase, actionTarget, value);
625 }
626 }
627 }
628
629 public find(actionTarget: dataform.ITarget): T[] {
630 if (!!actionTarget.database) {

Callers 15

constructorMethod · 0.95
setByNameLevelMethod · 0.45
setBySchemaLevelMethod · 0.45
alterActionNameMethod · 0.45
inputMethod · 0.45
dependenciesMethod · 0.45
runCliFunction · 0.45
actionsByTargetFunction · 0.45
actionsByCanonicalTargetFunction · 0.45
constructorMethod · 0.45

Calls 3

setByNameLevelMethod · 0.95
setBySchemaLevelMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected