@bitovi/sequelize-querystring-parser
Advanced tools
Comparing version 0.1.14 to 0.1.15
@@ -16,2 +16,3 @@ const { Op } = require("sequelize"); | ||
LIKE: "LIKE", | ||
ILIKE: "ILIKE", | ||
IN: "IN", | ||
@@ -33,2 +34,3 @@ NOT_IN: "NOT IN", | ||
[Operator.LIKE]: Op.like, | ||
[Operator.ILIKE]: Op.iLike, | ||
[Operator.EQUALS]: Op.eq, | ||
@@ -35,0 +37,0 @@ [Operator.NOT_EQUALS]: Op.ne, |
{ | ||
"name": "@bitovi/sequelize-querystring-parser", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@bitovi/querystring-parser": "^0.6.12", | ||
"@bitovi/querystring-parser": "^0.6.13", | ||
"sequelize": "^6.21.2" | ||
@@ -23,0 +23,0 @@ }, |
@@ -286,30 +286,74 @@ const { Op } = require("sequelize"); | ||
}, | ||
// TODO: resolve with HATCH-293. Skipped due to test failing | ||
// { | ||
// title: | ||
// "should parse strings correctly with the $like operator - end of string (Mongo)", | ||
// parameters: TODO, | ||
// expectedResults: TODO | ||
// }, | ||
// TODO: resolve with HATCH-293. Skipped due to test failing | ||
// { | ||
// title: | ||
// "should parse strings correctly with the $like operator - beginning of string (Mongo)", | ||
// parameters: TODO, | ||
// expectedResults: TODO | ||
// }, | ||
// TODO: resolve with HATCH-293. Skipped due to test failing | ||
// { | ||
// title: | ||
// "should parse strings correctly with the $like operator - contains string (Mongo)", | ||
// parameters: TODO, | ||
// expectedResults: TODO | ||
// }, | ||
// TODO: resolve with HATCH-293. Skipped due to test failing | ||
// { | ||
// title: | ||
// "should parse strings correctly with the $like operator - entire string (Mongo)", | ||
// parameters: TODO, | ||
// expectedResults: TODO | ||
// }, | ||
{ | ||
title: | ||
"should parse strings correctly with the $like operator - end of string", | ||
parameters: [{ LIKE: ["#name", "%ne"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.like]: "%ne" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $like operator - beginning of string", | ||
parameters: [{ LIKE: ["#name", "%ne"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.like]: "%ne" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $like operator - contains string", | ||
parameters: [{ LIKE: ["#name", "Jo%"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.like]: "Jo%" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $like operator - entire string", | ||
parameters: [{ LIKE: ["#name", "%an%"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.like]: "%an%" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $ilike operator - end of string", | ||
parameters: [{ ILIKE: ["#name", "%NE"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.iLike]: "%NE" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $ilike operator - beginning of string", | ||
parameters: [{ ILIKE: ["#name", "JO%"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.iLike]: "JO%" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $ilike operator - contains string", | ||
parameters: [{ ILIKE: ["#name", "%An%"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.iLike]: "%An%" } } }, | ||
}, | ||
}, | ||
{ | ||
title: | ||
"should parse strings correctly with the $ilike operator - contains string", | ||
parameters: [{ ILIKE: ["#name", "jOhN"] }, []], | ||
expectedResults: { | ||
errors: [], | ||
results: { where: { name: { [Op.iLike]: "jOhN" } } }, | ||
}, | ||
}, | ||
// numbers | ||
@@ -316,0 +360,0 @@ { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
39930
1284
0