File tree Expand file tree Collapse file tree
packages/plugins/driver-memory/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -693,11 +693,10 @@ export class InMemoryDriver implements DriverInterface {
693693 return { [ field ] : { $in : value } } ;
694694 case 'nin' : case 'not in' :
695695 return { [ field ] : { $nin : value } } ;
696- case 'contains' : case 'like' : case 'notcontains' : case 'not_contains' :
697- if ( operator === 'notcontains' || operator === 'not_contains' ) {
698- return { [ field ] : { $not : { $regex : new RegExp ( this . escapeRegex ( value ) , 'i' ) } } } ;
699- }
696+ case 'contains' : case 'like' :
700697 return { [ field ] : { $regex : new RegExp ( this . escapeRegex ( value ) , 'i' ) } } ;
698+ case 'notcontains' : case 'not_contains' :
699+ return { [ field ] : { $not : { $regex : new RegExp ( this . escapeRegex ( value ) , 'i' ) } } } ;
701700 case 'startswith' : case 'starts_with' :
702701 return { [ field ] : { $regex : new RegExp ( `^${ this . escapeRegex ( value ) } ` , 'i' ) } } ;
703702 case 'endswith' : case 'ends_with' :
You can’t perform that action at this time.
0 commit comments