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

Function wrapAsGroup

frontend/src/plugins/cel/logic/resolve.ts:66–76  ·  view source on GitHub ↗
(
  expr: SimpleExpr,
  operator: LogicalOperator = "_&&_"
)

Source from the content-addressed store, hash-verified

64
65// For simplify UI implementation, the "root" condition need to be a group.
66export const wrapAsGroup = (
67 expr: SimpleExpr,
68 operator: LogicalOperator = "_&&_"
69): ConditionGroupExpr => {
70 if (isConditionGroupExpr(expr)) return expr;
71 return {
72 type: ExprType.ConditionGroup,
73 operator,
74 args: [expr],
75 };
76};
77
78// Convert common expr to simple expr
79export const resolveCELExpr = (expr: CELExpr): SimpleExpr => {

Callers 13

DatabaseGroupFormFunction · 0.90
RuleEditSheetFunction · 0.90
utils.tsFile · 0.90
GrantAccessDialogFunction · 0.90
initializeFunction · 0.90
RequestRoleFormFunction · 0.90
handleRoleChangeFunction · 0.90
ProjectRoleBindingFormFunction · 0.90
EditMemberRoleDrawerFunction · 0.90
MaskingRuleConfigFunction · 0.90

Calls 1

isConditionGroupExprFunction · 0.90

Tested by

no test coverage detected