Skip to content

Commit 67257cd

Browse files
committed
Seperated LIKE with LIKEORALL option
1 parent b2e83eb commit 67257cd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ public String[] query_id(Query queryClause, String orderByStr, int offset, int l
435435
// NULL safety
436436
search = collection.find(bsonFilter);
437437
} else if (sec_mode.equals("LIKE")) {
438+
// Use secondary connection for LIKE query
439+
if (queryClause != null && queryClause.toSqlString().toUpperCase().indexOf("LIKE") > 0) {
440+
search = sec_collection.find(bsonFilter);
441+
}
442+
} else if (sec_mode.equals("LIKEORALL")) {
438443
// Use secondary connection for LIKE query
439444
if (queryClause == null || queryClause.toSqlString().toUpperCase().indexOf("LIKE") > 0) {
440445
search = sec_collection.find(bsonFilter);

0 commit comments

Comments
 (0)