0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

[MASTRA-3130] Metadata Filter Update for PG and Libsql (#3725)

## Description

<!-- Provide a brief description of the changes in this PR -->
The $in, $nin and $contains operators did not have correct functionality
for PG and LibSQL.

$in/$nin - only handled scalar fields, and did not work with arrays
$contains - did not work for substring matches

This PR fixes these operators to match Mongo and Upstash functionality.

## Related Issue(s)

<!-- Link to the issue(s) this PR addresses, using hashtag notation:
#123 -->

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [ ] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have generated a changeset for this PR

---------

Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
This commit is contained in:
NikAiyer 2025-04-21 12:25:13 -05:00 • committed by GitHub
commit c0f22b4788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 476 additions and 294 deletions