我使用使用Clojure一個H2數據庫。我做了一個表格,並把一些數據,這樣選擇將「CLOB:」到文本Clojure中
(j/create-table :locations
[:id "bigint primary key auto_increment"]
[:title "varchar (255)"]
[:part "clob"])
(j/insert-records :locations
{:title "Steven Gerrard: I'm not the new Beckham" :part "He might not have the Becks appeal -- but Steven Gerrard says he's ready to light up Hollywood in his own way..."}))
)
)
然後我選擇的數據
(defn newest []
(database/mysql-db)
(let [results (j/with-connection db-spec
(j/with-query-results res
["select id, title, part from locations"]
(doall res)))]
results))
而且我用了一個clostache頁面
<div class="container">
<sections>
{{#newest}}
<p style="padding-bottom: 15px;">{{title}}<p>
<p style="padding-bottom: 15px;">{{part}}<p>
{{/newest}}
</sections>
</div>
上的數據在頁面我得到
Steven Gerrard: I'm not the new Beckham
clob0: 'He might not have the Becks appeal -- but Steven Gerrard says he''s ready to light up Hollywood in his own way...'
我該怎麼辦卸下連接到我的數據庫中的文本字符串clob0:
?出現這種情況,即使我用text
,而不是clob
在我的數據庫中的部分列。