Skip to content

Commit

Permalink
support as alias of NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjudd committed Feb 13, 2015
1 parent 021a5ee commit 476e66e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sqlingvo/compiler.clj
Expand Up @@ -422,7 +422,8 @@
(defmethod compile-sql :list [db {:keys [children]}]
(concat-sql "(" (join-sql ", " (map #(compile-sql db %1) children)) ")"))

(defmethod compile-sql :nil [db _] ["NULL"])
(defmethod compile-sql :nil [db {:keys [as]}]
(concat-sql "NULL" (compile-alias db as)))

(defmethod compile-sql :offset [db {:keys [start]}]
(concat-sql "OFFSET " (if (number? start) (str start) "0")))
Expand Down

0 comments on commit 476e66e

Please sign in to comment.