I've updated clojure.contrib.sql to allow table and column names to be
specified using keywords or strings rather than only strings. This is
now parallel with clojure/resultset-seq which represents column names
as keywords.
Here's an example from clojure.contrib.sql.test:
(defn db-write []
(with-connection con (db)
(try
(drop-table con :fruit)
(catch Exception e))
(create-table con :fruit
:name "varchar(32)"
: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])))
This is an incompatible change to create-table which used to take a
sequence of column spec strings specifying both name and type in one
string, but now takes column names and their type specifications as
separate items. Please plan for a small fix-up to your code when you
pull the new clojure.contrib.sql.
--Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---