Skip to content

Commit

Permalink
Fix for FB2.x - true/false keywords are unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
mat02 committed Jul 19, 2021
1 parent 6550955 commit 5d7a216
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/metabase/driver/firebird.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d7a216

Please sign in to comment.