* `schemaMap`s are JSON schemas, which use the following structure to represent objects: * { field: { bsonType: 'object', properties: { ... } } } * * for example, a schema that looks like this `{ a: { b: int32 } }` would be encoded as * `{ a: { bsonType: 'object', properties: { b: < e
(path, object, value)
| 1034 | * @param {object} value the value to associate with the path in object |
| 1035 | */ |
| 1036 | function buildNestedPath(path, object, value) { |
| 1037 | let i = 0, component = path[i]; |
| 1038 | for (; i < path.length - 1; ++i, component = path[i]) { |
| 1039 | object[component] = object[component] == null ? { |
| 1040 | bsonType: 'object', |
| 1041 | properties: {} |
| 1042 | } : object[component]; |
| 1043 | object = object[component].properties; |
| 1044 | } |
| 1045 | object[component] = value; |
| 1046 | } |
| 1047 | |
| 1048 | const schemaMapPropertyReducer = (accum, [path, propertyConfig]) => { |
| 1049 | const bsonType = this.path(path).autoEncryptionType(); |
no outgoing calls
no test coverage detected