Skip to content

Commit

Permalink
add some experiment code of datomic Entity API into repl session
Browse files Browse the repository at this point in the history
  • Loading branch information
humorless committed Aug 6, 2024
1 parent 637f7fa commit a7b3f0a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion repl-sessions/init_db.clj
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,24 @@
(type (-> session-entity
:session/participants
first))
;; => co.gaiwan.compass.db.munged-entity
;; => datomic.query.EntityMap

(-> session-eid
db/entity
:session/type
db/entity
:session.type/color)
;; => "var(--talk-color)"

(-> session-eid
db/entity
:session/type
db/entity
(merge {}))

;; => {:db/ident :session.type/keynote,
;; :session.type/name "Keynote",
;; :session.type/color "var(--talk-color)"}

(db/pull '[* {:session/type [*]
:session/location [*]}] session-eid)

0 comments on commit a7b3f0a

Please sign in to comment.