Skip to content

Commit

Permalink
Fixed #72
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziest authored and ozgur-shape committed Aug 9, 2021
1 parent 2461811 commit 0041e14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"change-case": "^4.1.2",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"knex": "^0.95.7",
"knex": "^0.95.8",
"knex-paginate": "^2.2.0",
"pluralize": "^8.0.0",
"validatorjs": "^3.22.1"
Expand Down
5 changes: 5 additions & 0 deletions src/core/QueryParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ class QueryParser {
where.field = where.field.replace("$or.", "");
}

if (where.field.indexOf("$and.") === 0) {
where.prefix = "and";
where.field = where.field.replace("$and.", "");
}

this._applySpecialCondition(where, "$not", "<>");
this._applySpecialCondition(where, "$gt", ">");
this._applySpecialCondition(where, "$gte", ">=");
Expand Down

0 comments on commit 0041e14

Please sign in to comment.