mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Only replace starting and ending * char.
This commit is contained in:
parent
40abd454fc
commit
99f92f2c87
1 changed files with 4 additions and 4 deletions
|
|
@ -76,9 +76,9 @@ async function relationalQuery(
|
|||
let operator = '=';
|
||||
let paramValue = cv.value;
|
||||
|
||||
if (cv.value.includes('*')) {
|
||||
if (cv.value.startsWith('*') || cv.value.endsWith('*')) {
|
||||
operator = 'like';
|
||||
paramValue = cv.value.replaceAll('*', '%');
|
||||
paramValue = cv.value.replace(/^\*|\*$/g, '%');
|
||||
}
|
||||
|
||||
if (levelNumber === 1) {
|
||||
|
|
@ -180,9 +180,9 @@ async function clickhouseQuery(
|
|||
let operator = '=';
|
||||
let paramValue = cv.value;
|
||||
|
||||
if (cv.value.includes('*')) {
|
||||
if (cv.value.startsWith('*') || cv.value.endsWith('*')) {
|
||||
operator = 'like';
|
||||
paramValue = cv.value.replaceAll('*', '%');
|
||||
paramValue = cv.value.replace(/^\*|\*$/g, '%');
|
||||
}
|
||||
|
||||
if (levelNumber === 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue