MCPcopy Create free account
hub / github.com/couchbase/cbft / scopeCollTypeMapping

Function scopeCollTypeMapping

collection_utils.go:153–170  ·  view source on GitHub ↗
(in string)

Source from the content-addressed store, hash-verified

151}
152
153func scopeCollTypeMapping(in string) (string, string, string) {
154 vals := strings.SplitN(in, ".", 3)
155 scope := "_default"
156 collection := "_default"
157 typeMapping := ""
158 if len(vals) == 1 {
159 typeMapping = vals[0]
160 } else if len(vals) == 2 {
161 scope = vals[0]
162 collection = vals[1]
163 } else {
164 scope = vals[0]
165 collection = vals[1]
166 typeMapping = vals[2]
167 }
168
169 return scope, collection, typeMapping
170}
171
172// getScopeCollTypeMappings will return a deduplicated
173// list of collection names when skipMappings is enabled.

Callers 2

remapTypeMappingsFunction · 0.85
getScopeCollTypeMappingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected