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

Function getSubConditionFromExpr

backend/api/v1/database_service.go:163–173  ·  view source on GitHub ↗
(expr celast.Expr, getFilter func(expr celast.Expr) (string, error), join string)

Source from the content-addressed store, hash-verified

161}
162
163func getSubConditionFromExpr(expr celast.Expr, getFilter func(expr celast.Expr) (string, error), join string) (string, error) {
164 var args []string
165 for _, arg := range expr.AsCall().Args() {
166 s, err := getFilter(arg)
167 if err != nil {
168 return "", err
169 }
170 args = append(args, "("+s+")")
171 }
172 return strings.Join(args, fmt.Sprintf(" %s ", join)), nil
173}
174
175// ListDatabases lists all databases.
176func (s *DatabaseService) ListDatabases(ctx context.Context, req *connect.Request[v1pb.ListDatabasesRequest]) (*connect.Response[v1pb.ListDatabasesResponse], error) {

Callers 1

getIssueFindMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected