Member Junction
    Preparing search index...
    • Validates filter and compiles it into a predicate.

      Parameters

      • filter: object

        The filter object (QueryOptions.filter), or nothing.

      Returns MetadataFilterCompilation

      none when there is nothing to apply, ok with the predicate, or unsupported with the reason — an unknown operator, a non-array $and / $in, a nested object used as a value, and so on.

      const compiled = CompileMetadataFilter({ Entity: { $in: ['Members'] }, Status: 'Active' });
      if (compiled.Status === 'ok') {
      const keep = compiled.Predicate(field => row[field]);
      }