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

Struct functionImpl

db/functions/function.go:62–69  ·  view source on GitHub ↗

INITIALIZATION: implements UserFunction. Used for both JS and N1QL.

Source from the content-addressed store, hash-verified

60
61// implements UserFunction. Used for both JS and N1QL.
62type functionImpl struct {
63 *FunctionConfig // Inherits from FunctionConfig
64 name string // Name of function
65 typeName string // "function" or "resolver"
66 checkArgs bool // If true, args must be checked against Args
67 allowByDefault bool // If true, a missing Allow means allow, not forbid
68 compiled *sgbucket.JSServer // Compiled form of the function; nil for N1QL
69}
70
71// Compiles the functions in a UserFunctionConfigMap, returning UserFunctions.
72func CompileFunctions(ctx context.Context, config FunctionsConfig) (*db.UserFunctions, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected