Skip to content

Commit b472eb5

Browse files
Simon HoßSimon Hoß
authored andcommitted
fix not null
1 parent 6fd9234 commit b472eb5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/query/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class DynamoDBQueryCompiler extends QueryCompiler {
109109
scanParam.ExpressionAttributeValues[`:column_${columnCount}`] = null;
110110
let functionName = "attribute_not_exists";
111111
if (whereItem.not) {
112-
filterExpression += `(#column_${columnCount} != :column_${columnCount}`;
112+
filterExpression += `(#column_${columnCount} <> :column_${columnCount}`;
113113
functionName = "attribute_exists";
114114
}
115115
else {

src/query/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class DynamoDBQueryCompiler extends (QueryCompiler as any) {
121121

122122
let functionName = "attribute_not_exists";
123123
if (whereItem.not) {
124-
filterExpression += `(#column_${columnCount} != :column_${columnCount}`;
124+
filterExpression += `(#column_${columnCount} <> :column_${columnCount}`;
125125
functionName = "attribute_exists";
126126
} else {
127127
filterExpression += `(#column_${columnCount} = :column_${columnCount}`;

test/select.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe("when select", () => {
9696
},
9797
ProjectionExpression: "#project_0, #project_1",
9898
FilterExpression:
99-
"(#column_0 != :column_0 or attribute_exists(#column_0))",
99+
"(#column_0 <> :column_0 or attribute_exists(#column_0))",
100100
TableName: "test_test_table"
101101
},
102102
expect.anything()

0 commit comments

Comments
 (0)