(op)
| 632 | handle.$nor = createLogicalQueryOperatorHandler('$nor'); |
| 633 | |
| 634 | function createLogicalQueryOperatorHandler(op) { |
| 635 | return function logicalQueryOperatorHandler(val, context) { |
| 636 | if (!Array.isArray(val)) { |
| 637 | throw new TypeError('conditional ' + op + ' requires an array'); |
| 638 | } |
| 639 | |
| 640 | const ret = []; |
| 641 | for (const obj of val) { |
| 642 | ret.push(cast(this.embeddedSchemaType.schema ?? context.schema, obj, null, this?.$$context)); |
| 643 | } |
| 644 | |
| 645 | return ret; |
| 646 | }; |
| 647 | } |
| 648 | |
| 649 | handle.$near = |
| 650 | handle.$nearSphere = geospatial.cast$near; |
no outgoing calls
no test coverage detected
searching dependent graphs…