-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Fully Compatible
-
Query 2017-07-10, Query 2017-07-31
Proposed Syntax
$_internalSchemaPatternProperties imposes sub-schemas on fields of an object, based on whether or not they match a regex. It has the following form:
{ $_internalSchemaPatternProperties: <regex-expression-list> }
<regex-expression-list> has the following form:
[ {regex: <regex>, expression: <MatchExpression>}, .... ]
To constrain a subobject, wrap it in an $objectMatch:
{ <field>: $objectMatch: { $_internalSchemaPatternProperties: <regex-expression-list> } }