MCPcopy
hub / github.com/chartdb/chartdb / shouldAddToChangedMap

Function shouldAddToChangedMap

src/lib/domain/diff/diff-check/diff-check.ts:106–117  ·  view source on GitHub ↗
(
    attribute: T,
    changedAttributes?: T[]
)

Source from the content-addressed store, hash-verified

104// - empty array: never add
105// - array with values: only add if attribute is in the array
106const shouldAddToChangedMap = <T>(
107 attribute: T,
108 changedAttributes?: T[]
109): boolean => {
110 if (changedAttributes === undefined) {
111 return true;
112 }
113 if (changedAttributes.length === 0) {
114 return false;
115 }
116 return changedAttributes.includes(attribute);
117};
118
119export interface GenerateDiffOptions {
120 includeTables?: boolean;

Callers 7

compareTablesFunction · 0.85
compareFieldPropertiesFunction · 0.85
compareIndexPropertiesFunction · 0.85
compareCheckConstraintsFunction · 0.85
compareAreasFunction · 0.85
compareNotesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected