Re: jdbc select as camel case

2014-09-15 Thread Amir
never mind its :identifiers identity i mixed up, it was working already :D On Monday, 15 September 2014 13:51:13 UTC+2, Amir wrote: > > Hi, > > We are migrating from old deprecated library to new interface. I have a > select statement as follows > > select

jdbc select as camel case

2014-09-15 Thread Amir Wasim
select column name as keywords with camel case. Now as i understand new library has :identifiers which defaults to identity and lower case. What is the new option were we can keep camel case keywords as hinted in select statement. thanks in advance, Amir -- You received this message because yo

Web crawling tree traversal

2013-07-04 Thread Amir Fouladi
Hi everybody I'm a clojure newbie, so I'm sorry if I'm asking a dumb question. I'm trying to write a program to crawl a webpage, find all links and recursively do this until all the links in the website is crawled (of course I'm omitting external hosts to avoid infinite crawling). So basically

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
hey, thanks, it works. Did not know/think apply can be used in this situation. Regards, Amir On Thursday, December 6, 2012 12:19:28 PM UTC+1, Baishampayan Ghose wrote: > > How about using apply? > > For example - > > (sql/with-connection (db-connection) > (ap

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