This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-02
Channels
- # announcements (2)
- # beginners (32)
- # boot (10)
- # calva (81)
- # cider (39)
- # clojure (56)
- # clojure-europe (8)
- # clojure-italy (7)
- # clojure-new-zealand (1)
- # clojure-nl (8)
- # clojure-poland (1)
- # clojure-spec (12)
- # clojure-uk (38)
- # clojurescript (5)
- # community-development (1)
- # core-async (55)
- # cursive (3)
- # datomic (44)
- # dirac (15)
- # emacs (20)
- # events (1)
- # fulcro (57)
- # hyperfiddle (2)
- # jobs (9)
- # juxt (9)
- # kaocha (1)
- # lein-figwheel (1)
- # off-topic (93)
- # pathom (2)
- # pedestal (3)
- # planck (3)
- # reitit (15)
- # ring (10)
- # shadow-cljs (25)
- # spacemacs (7)
- # sql (19)
- # tools-deps (8)
@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.
What is your favourite solution to keep fresh DB for tests during developing? flyway
? Something similar?
@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
How would you ensure that if two migrations are run at the same time they cause problems?
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.
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.