Skip to content

Commit d7d7624

Browse files
Ricardo Cañuelonuclearcat
Ricardo Cañuelo
authored andcommitted
api.db: add support for regexes in mongodb queries
Introduce a new API query operator (re) to match query parameters using mongodb-compatible regular expressions. Signed-off-by: Ricardo Cañuelo <[email protected]>
1 parent 628a6d6 commit d7d7624

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/db.py

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Database:
3434
'gt': '$gt',
3535
'gte': '$gte',
3636
'ne': '$ne',
37+
're': '$regex',
3738
}
3839

3940
BOOL_VALUE_MAP = {

0 commit comments

Comments
 (0)