Skip to content

Commit 0e209f0

Browse files
Simon HoßSimon Hoß
authored andcommitted
build
1 parent e6ed90e commit 0e209f0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/query/compiler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,14 @@ class DynamoDBQueryCompiler extends QueryCompiler {
107107
}
108108
else if (whereItem.type === "whereNull") {
109109
scanParam.ExpressionAttributeValues[`:column_${columnCount}`] = null;
110-
filterExpression += `(#column_${columnCount} = :column_${columnCount}`;
111110
let functionName = "attribute_not_exists";
112111
if (whereItem.not) {
112+
filterExpression += `(#column_${columnCount} != :column_${columnCount}`;
113113
functionName = "attribute_exists";
114114
}
115+
else {
116+
filterExpression += `(#column_${columnCount} = :column_${columnCount}`;
117+
}
115118
filterExpression += ` or ${functionName}(#column_${columnCount}))`;
116119
}
117120
else if (whereItem.type === "whereBetween") {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"build": "tsc",
88
"test:debug": "node --inspect node_modules/.bin/jest --runInBand",
9-
"deploy": "npm run build && npm version patch && npm deploy"
9+
"deploy": "npm version patch && npm deploy"
1010
},
1111
"homepage": "https://github.com/simonhoss/knex-dynamodb-dialect",
1212
"author": "Simon Hoss",

0 commit comments

Comments
 (0)