diff options
Diffstat (limited to 'test/clojure_sql/core_test.clj')
-rw-r--r-- | test/clojure_sql/core_test.clj | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/clojure_sql/core_test.clj b/test/clojure_sql/core_test.clj deleted file mode 100644 index 6a12698..0000000 --- a/test/clojure_sql/core_test.clj +++ /dev/null @@ -1,43 +0,0 @@ -(ns clojure-sql.core-test - (:refer-clojure :exclude [sort-by]) - (:require [clojure-sql.core :refer :all] - [midje.sweet :refer :all])) - -(comment - - (fact - @(table :user) - => ["SELECT * FROM \"user\""] - - @(-> (table :user) (project [:username])) - => ["SELECT \"user\".\"username\" AS \"username\" FROM \"user\""] - - @(-> (table :user) (select '(= :username "george"))) - => ["SELECT * FROM \"user\" WHERE (\"user\".\"username\" = ?)" "george"] - - @(-> (table :user) (project {:username :u})) - => ["SELECT \"user\".\"username\" AS \"u\" FROM \"user\""] - - @(-> (table :user) (project {'(+ :age :modifier) :u})) - => ["SELECT (\"user\".\"age\" + \"user\".\"modifier\") AS \"u\" FROM \"user\""] - - @(-> (table :user) - (project [:id]) - (join (-> (table :x) - (project [:id]) - (join (-> (table :y) - (project [:id])) - :type :left)))) - => ["SELECT \"user\".\"id\" AS \"id\" FROM \"user\" INNER JOIN \"x\" ON ((\"user\".\"id\" = \"x\".\"id\"))"]) - - (into {} (-> (table :user) (project '{(+ :username :password) :u}))) - - (-> (table :users) - (project '[:username (+ 1 2 3)]) - (rename '{(+ 1 2 3) :x}) - (select `(exists ~(-> (table :users) - (select '(= 10 :username)))))) - - (-> (table :users) - (project {:username :un}) - (select '(= :username 10)))) |