Another update to create-table: column specs are now vectors to allow  
specifying more than just name and type naturally. The members of the  
vectors will be made into strings and concatenated with spaces  
interposed among them:

(defn db-write []
   (with-connection con (db)
     (try
      (drop-table con :fruit)
      (catch Exception e))
     (create-table con :fruit
       [:name "varchar(32)" "NOT NULL"]
       [:appearance "varchar(32)"]
       [:cost :int]
       [:grade :real])
     (insert-rows con :fruit
       ["Apple" "red" 59 87]
       ["Banana" "yellow" 29 92.2]
       ["Peach" "fuzzy" 139 90.0]
       ["Orange" "juicy" 89 88.6])
     (insert-values con :fruit [:name :cost]
       ["Mango" 722]
       ["Feijoa" 441])))

--Steve


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to