* `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)
| 1025 | * @param {object} value the value to associate with the path in object |
| 1026 | */ |
| 1027 | function buildNestedPath(path, object, value) { |
| 1028 | let i = 0, component = path[i]; |
| 1029 | for (; i < path.length - 1; ++i, component = path[i]) { |
| 1030 | object[component] = object[component] == null ? { |
| 1031 | bsonType: 'object', |
| 1032 | properties: {} |
| 1033 | } : object[component]; |
| 1034 | object = object[component].properties; |
| 1035 | } |
| 1036 | object[component] = value; |
| 1037 | } |
| 1038 | |
| 1039 | const schemaMapPropertyReducer = (accum, [path, propertyConfig]) => { |
| 1040 | const bsonType = this.path(path).autoEncryptionType(); |
no outgoing calls
no test coverage detected