Fork me on GitHub

@seancorfield sorry for reply so late. I was thinking the helpers should have a version to get sql-params. But it doesn't matter to much


@mpenet did a first draft of the vertx-sql-client wrapper with porsas, same api & mappers work as with sync, just an extra callback to handle the received results. Will polish and push out for benchmark testing:

(require '[porsas.async :as pa])

(def pool (pa/pool
            {:database "hello_world"
             :host "localhost"
             :port 5432
             :user "benchmarkdbuser"
             :password "benchmarkdbpass"
             :size 1}))

(def mapper (pa/data-mapper))

(pa/query-one mapper pool ["SELECT id, randomnumber from WORLD where id=$1" 1] println)
; ...prints {:id 1, :randomnumber 6233}


the client has it’s own pooling & prepared statement parameter syntax.


need to test how the pool size effects things, should require less open connections at least, maybe 1 is enough..


also, will push a separate ns which will have a fast mapper for next.jdbc, maybe a ns 😉


i'm having a little problem here

Roger Amorin Vieira18:05:30

Hi everyone, I'm developing a application that uses with a database, for that I am using two libraries: [ :as jdbc] [java-jdbc.sql :as sql] In the sql I'm trying to do a where with an operator "<" but I had tried many things and isnt working: My code (jdbc/query database (sql/select * table-name (sql/where conditions))) conditions -> {:id ["<" 50]} Someone can help me how I pass the arguments for the sql/where?


i'm trying to connect to a postgres database inside a docker container, here's my db-spec

(defn db
   {:classname "org.postgresql.Driver"
    :subprotocol "postgresql"
    :dbtype      "postgresql"
    :dbname      db-name
    :subname     (str "//postgres:5432/" db-name)
    :user        "postgres"
    :password    "Password"})
   (db db-name)))
on the :subname, i'm using the docker container service name, because docker-compose automatically manages the ip address for me, but when i run the containers, my web app tries to connect to the address, any ideas why?


oh nevermind, from the jdbc documentation: "For databases that require a hostname or IP address, java.jdbc assumes "" but that can be overidden with the :host option."