Fork me on GitHub

@metametadata I thought long and hard about the high-level syntactic sugar functions and decided to keep them in the top-level API because they handle things differently in some situations -- now that I've clarified how per-row functions worked in the core reducing API. If you look at the latest source, hopefully that will make sense.


Thanks for heads up. I like that they have "Syntactic sugar" comments now.


What is your favourite solution to keep fresh DB for tests during developing? flyway ? Something similar?


Also to keep updated DB on production


@kwladyka we're using migratus but flyway should be fine; only concern is if ddl is not transactional, if you have multiple servers running the same code you need to ensure it wont blow up if two of them do the same migration


thanks for input


How would you ensure that if two migrations are run at the same time they cause problems?


Personally I will run migrations as separate job. Not on every app start.


using for example flyway


only not sure if I will do it from Clojure or from bash. Because maybe sometimes I will need to run extra complex things to change in DB, but not at that moment.


we reset the db for each test; bear in mind if you're using component you can even have a different db per test and run tests in parallel


We use joplin and write migrations in plain Clojure for max flexibility. For testing there's a second db running with optimized settings and before every test every table is TRUNCATEd.


should jdbc-next be fully async? any function that do a IO call return a future channel?


but isn't JDBC API inherently synchronous?


ah, maybe you really mean jdbc-next and not next.jdbc


Async JDBC is not on table yet. It's something I'll look at in due course.

Tomas Arruda de Almeida16:04:56

Hello Everyone! I am dealing with an issue right now, I would like to execute a query case insensitive… here is my code:

(defn save-to-primavera [db params]
  (as-> {:insert-into :Bookings
         :values      [params]} %
        (honeysql/format %)
        (jdbc/execute! db % {:return-keys true})))
I have a table “Bookings” (with upper-case B) but the execute! does not find my table, it tries to find a table called “bookings”… Do you know how I could execute this query in my “Bookings” table?


@tomas.arruda Are you actually getting an error from that? I can't reproduce it locally.


One thing you can try is (honeysql/format % :quoting :ansi) since it may be PostgreSQL itself that is changing Bookings to bookings without it being quoted.