From a7ceaf63cdfcf8a5ac87ce95f85c7ae7a9b8c9b6 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Mon, 13 Jan 2025 13:45:46 +0700 Subject: [PATCH] add filter like --- src/helpers/common.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/common.ts b/src/helpers/common.ts index ad5f3fb..1322d67 100644 --- a/src/helpers/common.ts +++ b/src/helpers/common.ts @@ -121,6 +121,11 @@ export default class CommonHelper { whereVal[p + '_to'] = fr['to']; found = true; } + if (fr['like']) { + whereAttrPre.push('LOWER(' + p + ') like :' + p + '_like'); + whereVal[p + '_like'] = '%' + fr['like'] + '%';; + found = true; + } if (!found) { whereAttrPre.push("LOWER(" + p + ") = :" + p);