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

Function enhanceMappingsWithCollMetaField

collection_utils.go:268–280  ·  view source on GitHub ↗
(tm map[string]*mapping.DocumentMapping)

Source from the content-addressed store, hash-verified

266}
267
268func enhanceMappingsWithCollMetaField(tm map[string]*mapping.DocumentMapping) error {
269OUTER:
270 for _, mp := range tm {
271 fm := metaFieldMapping()
272 for fname := range mp.Properties {
273 if fname == CollMetaFieldName {
274 continue OUTER
275 }
276 }
277 mp.AddFieldMappingsAt(CollMetaFieldName, fm)
278 }
279 return nil
280}
281
282func metaFieldMapping() *mapping.FieldMapping {
283 fm := mapping.NewTextFieldMapping()

Callers 1

parseIndexParamsFunction · 0.85

Calls 1

metaFieldMappingFunction · 0.85

Tested by

no test coverage detected