clojure-china那个论坛我上不去了,我想这里很活跃,大佬有这么多,我就来问问
这些天我在尝试用korma与数据库交互,按照教程来写总是出现错误
第一步创建数据库test
然后创建表
create table courses (
id varchar(32) not null primary key,
name varchar(50) not null,
price real not null,
online bool not null,
days bigint not null
);
…
配置完毕后,再cider-jack-in的repl下尝试
(select cources)
抛出异常
IllegalArgumentException No value supplied for key: {:identifiers #object[clojure.core$identity 0x47663 "clojure.core$identity@47663"]} clojure.lang.PersistentHashMap.create (PersistentHashMap.java:77)
那换一个试试吧
(insert courses
(values { :id "s-201", :name "SQL", :price 99.9, :online false, :days 30 }))
抛出异常
ArityException Wrong number of args (2) passed to: jdbc/db-do-prepared-return-keys clojure.lang.AFn.throwArity (AFn.java:429)
holy shit ,身心橘皮,求大佬支援
ps: 我也去korma的github上看了看,也按照那里的代码写,还是这鸟样子