2020-09-21 02:17:37 +00:00
|
|
|
;; copyright (c) sean corfield, all rights reserved
|
|
|
|
|
|
|
|
|
|
(ns honey.sql-test
|
|
|
|
|
(:require #?(:clj [clojure.test :refer [deftest is testing]]
|
|
|
|
|
:cljs [cljs.test :refer-macros [deftest is testing]])
|
|
|
|
|
[honey.sql :as sut]))
|
|
|
|
|
|
|
|
|
|
(deftest mysql-tests
|
|
|
|
|
(is (= ["SELECT * FROM `table` WHERE `id` = ?" 1]
|
2020-09-21 04:33:04 +00:00
|
|
|
(#'sut/sql-format {:select [:*] :from [:table] :where [:= :id 1]}
|
|
|
|
|
{:dialect :mysql}))))
|