Skip to content

Commit

Permalink
removed p-> and p->> helpers from com.wsscode.promesa.macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkerlucio committed Dec 13, 2024
1 parent b153236 commit 354cc30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Expose query and entity on errors during eql interface calls
- Expose planner failure details on error message
- Track `::pcp/expects` on AND nodes, it includes all expects from the node chain
- BREAKING: removed `p->` and `p->>` helpers from `com.wsscode.promesa.macros`. These were old macros and currently Promesa has them in the library.

## [2024.11.23-alpha]
- Fix placeholders using different parameters
Expand Down
26 changes: 0 additions & 26 deletions src/promesa/com/wsscode/promesa/macros.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,3 @@
(p/catch res# (fn [~ex-sym] ~@ex-body))
res#))
(catch ~ex-kind ~ex-sym ~@ex-body)))))

#?(:bb
(defmacro p-> [& forms]
`(-> ~@forms))

:clj
(defmacro p-> [x & forms]
(let [fns (mapv (fn [arg]
(let [[f & args] (if (sequential? arg)
arg
(list arg))]
`(fn [p#] (~f p# ~@args)))) forms)]
`(p/chain (p/promise ~x) ~@fns))))

#?(:bb
(defmacro p->> [& forms]
`(->> ~@forms))

:clj
(defmacro p->> [x & forms]
(let [fns (mapv (fn [arg]
(let [[f & args] (if (sequential? arg)
arg
(list arg))]
`(fn [p#] (~f ~@args p#)))) forms)]
`(p/chain (p/promise ~x) ~@fns))))

0 comments on commit 354cc30

Please sign in to comment.