@mastra/pg 1.21.1 → 1.22.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16088,6 +16088,10 @@ function applyScoreFilters(acc, filters) {
16088
16088
  acc.conditions.push(`"scoreSource" = $${acc.next++}`);
16089
16089
  acc.params.push(filters.scoreSource ?? filters.source);
16090
16090
  }
16091
+ if (filters?.metadata && Object.keys(filters.metadata).length > 0) for (const [key, value] of Object.entries(filters.metadata)) {
16092
+ acc.conditions.push(`"metadata"->($${acc.next++}::text) = $${acc.next++}::jsonb`);
16093
+ acc.params.push(key, JSON.stringify(value ?? null));
16094
+ }
16091
16095
  }
16092
16096
  /** OLAP queries take an explicit scorerId / scoreSource pair as identity. */
16093
16097
  function pushScoreIdentity(acc, scorerId, scoreSource) {