MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / CallUserFunction

Method CallUserFunction

db/functions.go:74–80  ·  view source on GitHub ↗

Calls a user function by name, returning all the results at once.

(ctx context.Context, name string, args map[string]interface{}, mutationAllowed bool)

Source from the content-addressed store, hash-verified

72
73// Calls a user function by name, returning all the results at once.
74func (db *Database) CallUserFunction(ctx context.Context, name string, args map[string]interface{}, mutationAllowed bool) (interface{}, error) {
75 invocation, err := db.GetUserFunction(ctx, name, args, mutationAllowed)
76 if err != nil {
77 return nil, err
78 }
79 return invocation.Run(ctx)
80}
81
82//////// UTILITIES
83

Callers 6

do_funcMethod · 0.80
testUserFunctionsCommonFunction · 0.80
testUserFunctionsAsAdminFunction · 0.80
testUserFunctionsAsUserFunction · 0.80
TestUserFunctionsCRUDFunction · 0.80
callUserQueryFunction · 0.80

Calls 2

GetUserFunctionMethod · 0.95
RunMethod · 0.65

Tested by 5

testUserFunctionsCommonFunction · 0.64
testUserFunctionsAsAdminFunction · 0.64
testUserFunctionsAsUserFunction · 0.64
TestUserFunctionsCRUDFunction · 0.64
callUserQueryFunction · 0.64