Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Commit e5c7974

Browse files
committed
fix: lk and nl behave the same as eq
1 parent f507196 commit e5c7974

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

src/ast/expression.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export default function(expr) {
5252
// Search operators
5353
case 'lk':
5454
e = {}
55-
e[lft] = rgt
55+
e[lft] = {$like: rgt}
5656
return e
5757
case 'nl':
5858
e = {}
59-
e[lft] = rgt
59+
e[lft] = {$notLike: rgt}
6060
return e
6161
}
6262
}

src/filter.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,23 @@ export default class Filter {
137137
le(q) {
138138
return this.logical(q, 'le')
139139
}
140+
141+
/**
142+
* Op: lk
143+
* @param q
144+
* @return Filter
145+
*/
146+
lk(q) {
147+
return this.logical(q, 'lk')
148+
}
149+
150+
151+
/**
152+
* Op: nl
153+
* @param q
154+
* @return Filter
155+
*/
156+
nl(q) {
157+
return this.logical(q, 'nl')
158+
}
140159
}

0 commit comments

Comments
 (0)