From dd54fb3d2c09fb3aa90694eb0943766c2ef35db7 Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Tue, 13 Sep 2022 09:18:58 -0700 Subject: [PATCH] combine logic --- lib/clickhouse.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/clickhouse.js b/lib/clickhouse.js index 84be902b..15304214 100644 --- a/lib/clickhouse.js +++ b/lib/clickhouse.js @@ -72,18 +72,10 @@ function getFilterQuery(column, filters = {}, params = []) { switch (key) { case 'url': - arr.push(`and ${key}=$${params.length + 1}`); - params.push(decodeURIComponent(filter)); - break; - case 'os': case 'browser': case 'device': case 'country': - arr.push(`and ${key}=$${params.length + 1}`); - params.push(decodeURIComponent(filter)); - break; - case 'event_name': arr.push(`and ${key}=$${params.length + 1}`); params.push(decodeURIComponent(filter));