jdbc select as camel case

2014-09-15 Thread Amir Wasim
Hi, We are migrating from old deprecated library to new interface. I have a select statement as follows select CONT_ID as 'contId', PARENT_CONT_ID as 'parentContId', >From tablename before we were using (sql/with-naming-strategy {:keyword str} .) to select column name as keywords

reset! and merge for (transient {})

2013-07-02 Thread Amir Wasim
Hi, how we can achieve reset! and merge for (transient {}) e.g. when we have a doseq thanks. -- -- 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 Note that posts from new members are mode

reset! and merge for (transient {})

2013-07-02 Thread Amir Wasim
Is there reset! and merge a possibility for (transient {}) sometimes we have a doseq and it might be requirement sometime. -- -- 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 Note that

Re: possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Amir Wasim
complete example (ns wm.test (import [java.util.concurrent Executors]) ) (def deliveries (map char (range 65 90))) (defn- test-fn [delivery another param] (println "in test sleeping" delivery another param) (let[sleep-for (rand-int 1)] (println "sleeping for " sleep-for) (T

possible side-effect/problem in http://clojure.org/concurrent_programming

2013-06-14 Thread Amir Wasim
I was using the first example to make a process executing parallely (defn test-stm [nitems nthreads niters] (let [refs (map ref (repeat nitems 0)) pool (Executors/newFixedThreadPool nthreads) tasks (map (fn [t] (fn [] (dotimes [n n

dictionary sort in sortedmap

2013-02-04 Thread Amir Wasim
I want to sort a map by its keys according to dictionary when i do the following (into (sorted-map) {"1" "A" "2" "B" "11" "C" "3" "D"}) the result is {"1" "A", "11" "C", "2" "B", "3" "D"} which is expected result but what i expect is dictionary sort, {"1" "A", "2" "B", 3 "D", "11" "C"}. is

Re: list of lists to list of arguments

2012-12-06 Thread Amir Wasim
ply sql/insert-values "table-name" ["id" "val"] [[2 "B"][3 > "C"]])) > > Does that work? > > -BG > > On Thu, Dec 6, 2012 at 4:48 PM, Amir Wasim > > wrote: > > > > I am trying to use insert-values with value-

Re: list of lists to list of arguments

2012-12-06 Thread Amir Wasim
On Thursday, December 6, 2012 12:18:05 PM UTC+1, Amir Wasim wrote: > > I am trying to use insert-values with value-groups which works like the > following > > (sql/with-connection (db-connection) > (sql/insert-values "table-name" ["id" "val&qu

list of lists to list of arguments

2012-12-06 Thread Amir Wasim
I am trying to use insert-values with value-groups which works like the following (sql/with-connection (db-connection) (sql/insert-values "table-name" ["id" "val"] [2 "B"][3 "C"])) here [2 "B"][3 "C"] is with two value groups the problem is i have list of list [[2 "B"][3 "C"]] and i want

list of list to argument list

2012-12-06 Thread Amir Wasim
I am trying to use insert-values with value-groups which works like the following (sql/with-connection (db-connection) (sql/insert-values "table-name" ["id" "val"] [2 "B"][3 "C"])) here [2 "B"][3 "C"] is with two value groups the problem is i have list of list [[2 "B"][3 "C"]] and i want

Re: in keyword withing where claus java-jdbc

2012-12-05 Thread Amir Wasim
o-commands which halts the jvm but there is no error on terminal. Do you know a way to raw update statement with "in" within Where clause... On Wednesday, December 5, 2012 4:53:39 AM UTC+1, Sean Corfield wrote: > > ... in ? is not supported in c.j.jdbc > > > On Tue, Dec

in keyword withing where claus java-jdbc

2012-12-04 Thread Amir Wasim
I am trying to use the following (defn commit-acknowledged [acks] (sql/with-connection (db-connection) (sql/transaction (sql/update-values "MSGIDS" ["msg_id in ?" acks] {"status" "H"}) ) ) ) here acks is type of clojure.lang.PersistentVector when i call this function i a