Skip to content

Commit a0e4801

Browse files
committed
DHFPROD-2461: case insensitive searches for step definitions
1 parent 54a0023 commit a0e4801

File tree

1 file changed

+3
-3
lines changed
  • marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/impl

1 file changed

+3
-3
lines changed

marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/impl/step.sjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ class Step {
7777
}
7878

7979
getStepsByType(type = 'custom') {
80-
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('type', type)];
80+
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('type', type, 'case-insensitive')];
8181
return cts.search(cts.andQuery(query)).toArray();
8282
}
8383

8484
getStepByNameAndType(name, type = 'custom') {
85-
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('name', name), cts.jsonPropertyValueQuery('type', type)];
85+
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('name', name, 'case-insensitive'), cts.jsonPropertyValueQuery('type', type, 'case-insensitive')];
8686
let doc = fn.head(cts.search(cts.andQuery(query)));
8787
if(doc) {
8888
return doc.toObject();
8989
}
9090
}
9191

9292
getStepProcessor(flow, name, type = 'custom') {
93-
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('name', name), cts.jsonPropertyValueQuery('type', type)];
93+
let query = [cts.collectionQuery('http://marklogic.com/data-hub/step-definition'), cts.jsonPropertyValueQuery('name', name, 'case-insensitive'), cts.jsonPropertyValueQuery('type', type, 'case-insensitive')];
9494
let doc = fn.head(cts.search(cts.andQuery(query)));
9595
if(doc){
9696
doc = doc.toObject();

0 commit comments

Comments
 (0)