update: better anchor support with SPA compatibility

pull/1095/head
Holger Huo 2022-04-14 18:09:26 +08:00
parent be0c43dcaa
commit 4a5e9d07f1
1 changed files with 3 additions and 1 deletions

View File

@ -65,9 +65,11 @@ export function getFilterQuery(table, filters = {}, params = []) {
switch (key) {
case 'url':
if (table === 'session' || table === 'pageview' || table === 'event') {
arr.push(`and (${table}.${key}=$${params.length + 1} or ${table}.${key} like $${params.length + 2})`);
arr.push(`and (${table}.${key}=$${params.length + 1} or ${table}.${key} like $${params.length + 2} or (${table}.${key} like $${params.length + 3} and ${table}.${key} not like $${params.length + 4}))`);
params.push(decodeURIComponent(value));
params.push(`${decodeURIComponent(value)}?%`);
params.push(`%${decodeURIComponent(value)}#%`);
params.push(`%${decodeURIComponent(value)}#/%`);
}
break;