当尝试使用clojure.java.sql / create-table创建表时,我得到了异常:
batch entry 0: near "-": syntax error
[Thrown class java.sql.BatchUpdateException]
create-table调用如下所示:
(sql/create-table :stories
[:story-id :integer "PRIMARY KEY"]
[:story-name :text]
[:story-name-url :text]
[:category :text]
[:genre-one :text]
[:genre-two :text]
[:created-on :text]
[:updated-on :text]
[:review-count :integer]
[:chapter-count :integer]
[:word-count :integer]
[:rating :integer]
[:language :integer]
[:is-complete :boolean]
[:is-crossover :boolean]
[:type :text]
[:pairing :text]))))
答案 0 :(得分:2)
问题是字段中不能包含“ - ”字符。将' - '更改为'_'将解决问题。