From 0f3f06c19a3800df4b9c0c6e59bd256f6c94030b Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Thu, 6 Apr 2017 22:59:50 +0300 Subject: [PATCH] Add missed file --- src/clj/commiteth/db/usage_metrics.clj | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/clj/commiteth/db/usage_metrics.clj diff --git a/src/clj/commiteth/db/usage_metrics.clj b/src/clj/commiteth/db/usage_metrics.clj new file mode 100644 index 0000000..545fae3 --- /dev/null +++ b/src/clj/commiteth/db/usage_metrics.clj @@ -0,0 +1,10 @@ +(ns commiteth.db.usage-metrics + (:require [commiteth.db.core :refer [*db*] :as db] + [clojure.java.jdbc :as jdbc] + [clojure.tools.logging :as log])) + +(defn usage-metrics-by-day + ([] (usage-metrics-by-day 30)) + ([limit-days] + (jdbc/with-db-connection [con-db *db*] + (db/usage-metrics-by-day {:limit_days limit-days}))))