Skip to content

Commit 6a1cfbc

Browse files
committed
Change: Rename DSL query naming mustNotExists to doesNotExist
1 parent 8a4fc22 commit 6a1cfbc

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

pkg/openSearch/osquery/boolQueryBuilder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (q *BoolQueryBuilder) AddFilterRequest(request *filter.Request) error {
151151
if handler, ok := operatorMapping[field.Operator]; ok {
152152
value := field.Value
153153

154-
if field.Operator == filter.CompareOperatorExists || field.Operator == filter.CompareOperatorMustNotExists {
154+
if field.Operator == filter.CompareOperatorExists || field.Operator == filter.CompareOperatorDoesNotExist {
155155
value = "" // exists operator does not need a value, but for more consistent handling just pass a dummy value
156156
}
157157
if value == nil {
@@ -290,7 +290,7 @@ func defaultCompareOperators() []CompareOperator {
290290
Handler: HandleCompareOperatorExists, MustCondition: true,
291291
},
292292
{
293-
Operator: filter.CompareOperatorMustNotExists,
293+
Operator: filter.CompareOperatorDoesNotExist,
294294
Handler: HandleCompareOperatorExists, MustCondition: false,
295295
},
296296
}

pkg/openSearch/osquery/boolQueryBuilder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func TestBoolQueryBuilder_AddFilterRequest(t *testing.T) {
612612
addTest("operator must not Exists", testCase{
613613
filterRequest: singleFilter(filter.RequestField{
614614
Name: "keywordOmitEmptyField",
615-
Operator: filter.CompareOperatorMustNotExists,
615+
Operator: filter.CompareOperatorDoesNotExist,
616616
}),
617617
wantDocuments: []ostesting.TestType{doc0},
618618
})

pkg/query/filter/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ CompareOperator ENUM(
7575
betweenDates
7676
7777
exists
78-
mustNotExists
78+
doesNotExist
7979
8080
isEqualToRating
8181
isNotEqualToRating

pkg/query/filter/type_enum.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)