This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-11
Channels
- # aleph (50)
- # announcements (20)
- # babashka (68)
- # beginners (70)
- # calva (25)
- # cider (1)
- # clj-kondo (10)
- # cljs-dev (3)
- # clojars (1)
- # clojure (113)
- # clojure-australia (7)
- # clojure-berlin (4)
- # clojure-europe (47)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-serbia (5)
- # clojure-spec (11)
- # clojure-uk (8)
- # clojurescript (16)
- # community-development (2)
- # conjure (2)
- # cursive (15)
- # data-oriented-programming (35)
- # datahike (12)
- # datascript (5)
- # datomic (13)
- # duct (7)
- # fulcro (21)
- # graalvm (94)
- # graphql (1)
- # helix (4)
- # honeysql (19)
- # jackdaw (8)
- # jobs (2)
- # jobs-rus (1)
- # leiningen (1)
- # malli (32)
- # missionary (1)
- # mount (1)
- # off-topic (40)
- # perun (2)
- # portal (7)
- # reitit (10)
- # rewrite-clj (26)
- # shadow-cljs (90)
- # spacemacs (29)
- # sql (17)
- # tools-deps (49)
- # wasm (1)
- # xtdb (26)
Hello. Does anybody know how to add a "for update nowait" clause in Korma? The closest thing I found is korma.core/modifier
, but it adds the clause to the beginning of the query:)
I'm surprised korma is still being used. Last time I heard about it was maybe 7-8 years ago!
Yep, it's not great, but IMHO if it is used as a simple DSL (and if all the inputs are sanitized 🙂) does the job well
HoneySQL V2 supports that (and is a much more complete DSL than Korma).
Thanks, but unfortunately migrating to HoneySQL is not an option... I ended up writing a parametrised sql query and executing it via korma...
Does anybody know of a Clojure SQL library that automatically transforms SQL results into tree-like structures (ideally via foreign keys, etc)? I feel like a saw a library like that, but I can’t remember the name.
I've had a few requests over the years for adding such functionality to the various SQL-related libs I maintain so if you find anything, I'd be very interested.
Perhaps this (but I think it was a different library that I saw): https://github.com/metabase/toucan
The closest in c.j.j / next.jdbc
is the datafy
/`nav` support that lets you lazily traverse the DB via FK relationships (but they are defined by convention or in data -- not derived from the DB metadata).
Toucan feels very OOP/ORM-y to me...
Yeah… you need to define your model… And this whole “hydration” talk 🙂 But I haven’t gone through it carefully, just now seeing it for the first time.
Perhaps datafy/nav is good enough… I gotta give it a shot. Thanks @seancorfield 🙂
You can have something like:
{:order-id 1
:name "X"
:address {:street "123 Main"
:zip "99999"
:city "XYZ"}}
… from two tables, let’s say “orders” and “addresses” where :address is a foreign key in the “orders” table, pointing to “addresses” table?I don't understand what you're asking, sorry.
I used to enjoy https://github.com/paper-trail-gem/paper_trail in my Rails years.
Versioning/auditing is a big reason why Datomic, ES/CQRS, etc have traction. paper_trail
gives one something equivalent while still having the benefits of SQL (I particularly like its leanness).
Anyone has attempted to code an paper_trail equivalent in ?