korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.48k stars 222 forks source link

(select (fields (where vs. (select* (where #219

Closed The-Alchemist closed 10 years ago

The-Alchemist commented 10 years ago

I'm not sure if I'm misunderstanding the API or found a bug:

=> (select* Course (where {:language "zh-tw"}))
CompilerException clojure.lang.ArityException: Wrong number of args (1) passed to: core$where, compiling:(/private/var/folders/e6/e6ubGzAhGXaM8nbwhgxbCU+++TI/-Tmp-/form-init5778102303886925193.clj:1:17) 
=> (select Course (fields :name) (where {:language "zh-tw"}))
[{:name "????"} {:name "??????Shi-ji (1) ?"} {:name "??????????????"} {:name "???? I (Introduction to Optics I)"} {:name "The Beauty of Kunqu Opera | ????"} {:name "?????? (Understanding the Greek Philosophy)"} {:name "Classics of Chinese Humanities: Guided Readings | ????????"}]

Please ignore the bad UTF-8 data. I'm wondering why I can't use (select* (where.

Thanks!

immoh commented 10 years ago
(-> (select* Course) (where {:language "zh-tw"}))
The-Alchemist commented 10 years ago

@immoh: Oh, thank you. I knew I messed something up ;)