mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🎉 Add backend management module with duplicate file and duplicate project
This commit is contained in:
parent
d1261fc841
commit
9945243a23
5 changed files with 790 additions and 6 deletions
|
@ -217,9 +217,10 @@
|
|||
(defn get-by-params
|
||||
([ds table params]
|
||||
(get-by-params ds table params nil))
|
||||
([ds table params opts]
|
||||
([ds table params {:keys [uncheked] :or {uncheked false} :as opts}]
|
||||
(let [res (exec-one! ds (sql/select table params opts))]
|
||||
(when (or (:deleted-at res) (not res))
|
||||
(when (and (not uncheked)
|
||||
(or (:deleted-at res) (not res)))
|
||||
(ex/raise :type :not-found
|
||||
:hint "database object not found"))
|
||||
res)))
|
||||
|
@ -261,9 +262,12 @@
|
|||
(PGpoint. (:x p) (:y p)))
|
||||
|
||||
(defn create-array
|
||||
[conn type aobjects]
|
||||
[conn type objects]
|
||||
(let [^PGConnection conn (unwrap conn org.postgresql.PGConnection)]
|
||||
(.createArrayOf conn ^String type aobjects)))
|
||||
(if (coll? objects)
|
||||
(.createArrayOf conn ^String type (into-array Object objects))
|
||||
(.createArrayOf conn ^String type objects))))
|
||||
|
||||
|
||||
(defn decode-pgpoint
|
||||
[^PGpoint v]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue