bookshelf-modelbase-plus
Advanced tools
Comparing version 2.9.1 to 2.10.0
@@ -108,2 +108,16 @@ const _ = require('lodash'); | ||
'LIKE': 'LIKE', | ||
'MATCH': 'MATCH', | ||
'NOT MATCH': 'NOT MATCH', | ||
'NOT_MATCH': 'NOT MATCH', | ||
'MATCH_NATURAL': 'MATCH', | ||
'NOT_MATCH_NATURAL': 'NOT MATCH', | ||
'NOT MATCH NATURAL': 'NOT MATCH', | ||
'MATCH_BOOL': 'MATCH,IN BOOLEAN MODE', | ||
'MATCH BOOL': 'MATCH,IN BOOLEAN MODE', | ||
'NOT_MATCH_BOOL': 'NOT MATCH,IN BOOLEAN MODE', | ||
'NOT MATCH BOOL': 'NOT MATCH,IN BOOLEAN MODE', | ||
'MATCH_QUERY': 'MATCH,WITH QUERY EXPANSION', | ||
'MATCH QUERY': 'MATCH,WITH QUERY EXPANSION', | ||
'NOT_MATCH_QUERY': 'NOT MATCH,WITH QUERY EXPANSION', | ||
'NOT MATCH QUERY': 'NOT MATCH,WITH QUERY EXPANSION', | ||
'NOT_LIKE': 'NOT LIKE', | ||
@@ -213,2 +227,7 @@ 'NOT LIKE': 'NOT LIKE', | ||
} | ||
if (operator.includes('MATCH')) { | ||
const matchParts = operator.split(','); | ||
return searchChain[options._logic === 'or' ? 'orWhereRaw' : 'andWhereRaw']( | ||
`${matchParts[0]} (??) AGAINST (? ${matchParts[1] || ''})`, [`${tableName}.${key}`, value]); | ||
} | ||
return searchChain[options._logic === 'or' ? 'orWhere' : 'andWhere'](`${tableName}.${key}`, operator, value); | ||
@@ -215,0 +234,0 @@ }, this.whereQuery(searchChain, whereVals, options._logic)); |
{ | ||
"name": "bookshelf-modelbase-plus", | ||
"version": "2.9.1", | ||
"version": "2.10.0", | ||
"description": "Extended functionality for REST operations with validation, filtering, ordering, importing records.", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
@@ -103,2 +103,8 @@ # bookshelf-modelbase-plus | ||
- NOT_IN | ||
- MATCH | ||
- NOT_MATCH | ||
- MATCH_BOOL | ||
- NOT_MATCH_BOOL | ||
- MATCH_QUERY | ||
- NOT_MATCH_QUERY | ||
@@ -105,0 +111,0 @@ #### Special queries |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76293
1460
301