Fork me on GitHub
#clojure-nl
<
2018-04-25
>
ajs07:04:39

Good morning Joost.

gklijs07:04:34

Good morning all

borkdude07:04:50

Good morning! What are you all up to today?

gklijs07:04:33

Working on upgading a big monolitic java cms, but from home, so I probably have time to setup the micro clojure cms so my girlfriend can start creating content for the cattery.

thomas08:04:45

I got my day off today!!! Busy scanning old negatives

joost-diepenmaat10:04:10

I’m debugging sql/clojure performance issues. ⌨️

borkdude10:04:27

Lol I think I should look at the clock on my VPS

gklijs10:04:01

I think it’s nice, I played a little with it, but it’s a much easier setup then cucumber with selenium, and using macros you could easily create something to write ‘readable’ tests if you want to

borkdude10:04:16

@joost-diepenmaat what clj sql lib do you use? We write pure sql queries using hugsql

arnout10:04:51

+1 for hugsql, very nice library

borkdude10:04:41

We also have a reducible thing for processing rows using transducers, for giant ass results.

gklijs10:04:20

I only used alaisi/postgres.async following a graphql example, left me stuck at about 500 ‘operations’ a second, might rewrite to hugsql to see if it increases performance.

eval202010:04:33

downside of hugsql I found were the macros

eval202011:04:06

oksql addresses this and some other issues: https://github.com/swlkr/oksql#why

joost-diepenmaat11:04:52

We’re using honeysql mostly. It’s the easiest way to generate dynamic queries.

borkdude11:04:56

@gklijs I’ve done that for a while. Works great, but it’s nice to edit sql in a .sql file and not having it as an inline string.

gklijs11:04:01

@eval2020 definitely gonna give oksql a try soon, looks nice

borkdude11:04:55

we haven’t run into the validation issue that the README mentions with hugsql: just call the generated function, no problem

borkdude11:04:09

I also wonder if it supports the host of features that hugsql provides

lmergen11:04:33

oksql looks interesting! is it a bit popular @eval2020 ?

lmergen11:04:11

i do like the idea of hugsql, but i am a bit allergic towards macros

lmergen11:04:15

also, don't use postgresql.async, it's a farce -- they just all do thread-per-connection in the background + a lot of multiplexing, i haven't found any big advantage to that myself

borkdude11:04:19

well, if I have to choose between macros or code generation (as in spitting out files), I choose macros 🙂 there’s only one macro in hugsql you use to go from .sql to defining query functions. no magic, that’s fine with me for now.

gklijs12:04:16

@lmergen I just copied bits and pieces from the lacinia manual, only a bit later the writer admitted it was just added to the tutorial as example, and that he himself did not had much experience using clojure with sql (they use something else at Walmart).

eval202012:04:11

@lmergen almost 50 stars (first commit in oct 2017)… I thought it was anounced on Reddit - but searching fails me…owell, reddit-search… 😉

lmergen12:04:13

@gklijs right, well i would definitely just use clojure.java.jdbc, it's pretty much compatible with everything else out there

lmergen12:04:25

i.e. you can at a later point easily transition to some SQL wrapping library, and it will most likely still spit out sqlvecs that you can feed to java.jdbc

borkdude12:04:31

this is what hugsql also can do: produce sqlvecs you can use in java.jdbc, aside from producing functions you can call (without directly using java.jdbc)