From 5d7a216c9533fe2fbedca647183be21adfde7259 Mon Sep 17 00:00:00 2001 From: mat02 Date: Mon, 19 Jul 2021 12:57:01 +0200 Subject: [PATCH] Fix for FB2.x - true/false keywords are unsupported --- src/metabase/driver/firebird.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/metabase/driver/firebird.clj b/src/metabase/driver/firebird.clj index 130e643..e8e371e 100644 --- a/src/metabase/driver/firebird.clj +++ b/src/metabase/driver/firebird.clj @@ -153,6 +153,9 @@ (defmethod sql.qp/date [:firebird :quarter-of-year] [_ _ expr] (hx/+ (hx// (hx/- (hsql/call :extract :MONTH expr) 1) 3) 1)) (defmethod sql.qp/date [:firebird :year] [_ _ expr] (hsql/call :extract :YEAR expr)) +;; Firebird 2.x doesn't support TRUE/FALSE, replacing them with 1 and 0 +(defmethod sql.qp/->honeysql [:firebird Boolean] [_ bool] (if bool 1 0)) + (defmethod sql.qp/add-interval-honeysql-form :firebird [driver hsql-form amount unit] (if (= unit :quarter) (recur driver hsql-form (hx/* amount 3) :month)