MCPcopy Create free account
hub / github.com/bytebase/bytebase / buildGroup

Function buildGroup

frontend/src/utils/issue/cel.ts:334–348  ·  view source on GitHub ↗
(
    conditions: (
      | DatabaseLevelCondition
      | SchemaLevelCondition
      | TableLevelCondition
      | ColumnLevelCondition
    )[]
  )

Source from the content-addressed store, hash-verified

332 }
333
334 function buildGroup(
335 conditions: (
336 | DatabaseLevelCondition
337 | SchemaLevelCondition
338 | TableLevelCondition
339 | ColumnLevelCondition
340 )[]
341 ): string {
342 if (conditions.length === 1) {
343 return buildCondition(conditions[0]);
344 } else {
345 const conditionStrings = conditions.map(buildCondition);
346 return `${conditionStrings.map((s) => `(${s})`).join(" || ")}`;
347 }
348 }
349
350 const topLevelCondition = buildGroup(conditions);
351 return `(${topLevelCondition})`;

Callers 1

convertToCELStringFunction · 0.85

Calls 1

buildConditionFunction · 0.85

Tested by

no test coverage detected