Skip to content

Commit

Permalink
Added cases for returType.Exists in exp_lists and exp_maps
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed Sep 3, 2024
1 parent d858646 commit 29a98b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/exp_lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function getListType (type, returnType, isMulti) {
expected = exp.type.LIST
}
break
case lists.returnType.EXISTS:
expected = exp.type.BOOL
break
case lists.returnType.NONE:
default:
throw new TypeError('either set the return type as auto or match with return object data type')
Expand Down
3 changes: 3 additions & 0 deletions lib/exp_maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function getMapType (type, returnType, isMulti) {
expected = exp.type.LIST
}
break
case maps.returnType.EXISTS:
expected = exp.type.BOOL
break
case maps.returnType.KEY_VALUE:
case maps.returnType.ORDERED_MAP:
case maps.returnType.UNORDERED_MAP:
Expand Down

0 comments on commit 29a98b2

Please sign in to comment.