This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-17
Channels
- # announcements (1)
- # babashka (6)
- # beginners (5)
- # boot (18)
- # calva (4)
- # clj-kondo (39)
- # cljdoc (1)
- # cljs-dev (1)
- # clojure (24)
- # clojure-italy (5)
- # clojure-spec (5)
- # clojurescript (20)
- # cursive (10)
- # data-science (1)
- # datomic (1)
- # emacs (1)
- # fulcro (1)
- # kaocha (5)
- # rewrite-clj (18)
- # shadow-cljs (11)
- # spacemacs (35)
- # sql (11)
- # vim (13)
First cut of documentation for middleware: https://github.com/seancorfield/next-jdbc/blob/master/doc/middleware.md -- feedback and suggestions welcome!
I suspect most people will be more excited about a way to provide default options 🙂 but I think I know at least one person here who might be excited about the logging aspects of middleware!
I'd appreciate at least some folks actually walking through that documentation and making sure that the examples really work for them.
Also, TIL: timestamp in SQL Server is not like other databases -- it's a monotonically increasing numeric type that you cannot insert values into! So my tests have to use datetime
for MS SQL and timestamp
for everything else. Good job SQL is standardized, eh?
have you considered using interceptors in place of the middleware pattern? https://quanttype.net/posts/2018-08-03-why-interceptors.html
@thenonameguy because of the way next.jdbc
was designed and optimized for performance, neither a strict middleware approach nor a strict interceptor approach would work. If you look at what I've implemented, you'll see it's really part middleware and part interceptor: it wraps the connectable and the builder like middleware in order to provide four interception points (pre/post/row/resultset).
@U04V70XH6 understood, thanks for the insight.
@U0NBGRGD6 no, but the DDL support in c.j.j. was very minimal -- just helpers to construct create/delete DDL strings. It wasn't worth adding those to next.jdbc
.
You can execute any DDL with next.jdbc
, it just doesn't help you create those strings.
@U04V70XH6 thanks!
@thenonameguy because of the way next.jdbc
was designed and optimized for performance, neither a strict middleware approach nor a strict interceptor approach would work. If you look at what I've implemented, you'll see it's really part middleware and part interceptor: it wraps the connectable and the builder like middleware in order to provide four interception points (pre/post/row/resultset).