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

Function addCondition

frontend/src/react/components/ExprEditor.tsx:1358–1371  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1356 };
1357
1358 const addCondition = () => {
1359 const factor = factorList[0];
1360 if (!factor) return;
1361 const operators = getOperatorListByFactor(factor, overrideMap);
1362 const op = operators[0] as ConditionOperator | undefined;
1363 if (!op) return;
1364 doUpdate((group) => {
1365 group.args.push({
1366 type: ExprType.Condition,
1367 operator: op,
1368 args: [factor, getDefaultValue(factor, op)],
1369 } as ConditionExpr);
1370 });
1371 };
1372
1373 const addConditionGroup = () => {
1374 doUpdate((group) => {

Callers

nothing calls this directly

Calls 3

getOperatorListByFactorFunction · 0.90
doUpdateFunction · 0.85
getDefaultValueFunction · 0.85

Tested by

no test coverage detected