redis-om-node
redis-om-node copied to clipboard
Add in (eq for multiple values)
Check a field against an array of values, similar to SQLs IN.
Could also make this variadic so you can say .where('foo').eq('alfa', 'bravo', 'charlie') as well as .where('foo').eq(['alfa', 'bravo', 'charlie']).
It could be great if we could exclude too: .where('foo').not.eq('alfa', 'bravo', 'charlie') or .where('foo').not.eq(['alfa', 'bravo', 'charlie']).
Is there a way to do it through searchRaw in the meantime?
I think the way I wrote search, the negation will just work. But I'll confirm when I work on this feature. For a call to .searchRaw this should be perfectly possible.
@foo:{ alfa | bravo | charlie }: alfa OR bravo OR charlie
@foo:{ alfa } @foo:{ bravo } @foo:{ charlie }: alfa AND bravo AND charlie
-@foo:{ alfa } -@foo:{ bravo } -@foo:{ charlie }: NOT alfa AND NOT bravo AND NOT charlie