Fork me on GitHub
#announcements
<
2021-05-02
>
ribelo10:05:41

from today doxa can be even faster than datascript https://github.com/ribelo/doxa#can-we-be-faster-than-datascript-yes

🚀 12
👏 2
ribelo13:05:06

sry, is there any place for new releases?

yuhan14:05:37

Is this a library meant for public consumption or more like a series of explorations? I found the API quite hard to understand from the Readme, and none of the public functions have docstrings - just some feedback 🙂

yuhan14:05:58

The source definitely reads more like an exploratory notebook and it seems that the dependencies on encore, timbre, shadow-cljs are only used in comment forms and should be put into some sort of :dev alias.

ribelo14:05:21

@UCPS050BV doxa was born by accident while testing what a meander can do

ribelo14:05:50

I did not expect any interest, so for a long time there were neither tests nor readme

ribelo14:05:39

I will probably write docstrings once I have worked out more or less in my head how it should look and be used.

👍 1
yuhan14:05:32

I feel like the commit function would look better taking variable arity of transactions, except there's an optional tx-meta argument which I couldn't figure out what it was for

ribelo14:05:30

tx-meta is written to the db metadata

ribelo14:05:23

you can only listen! for a specific tx-meta

ribelo15:05:55

(def conn_ (atom (dx/create-dx)))
(listen! @conn_
         (fn [db]
           (let [tx-meta ((meta db) :tx-meta)]
             (cond
               (#{:one :two} tx-meta)
               (println :something)
               (#{:three} tx-meta)
               (println :something-else)))))

(dx/commit! conn_ [:dx/put {:db/id 0 :key :value}] :one)
(dx/commit! conn_ [:dx/put {:db/id 1 :key :value}] :two)
(dx/commit! conn_ [:dx/put {:db/id 2 :key :value}] :three)
;; => repl
;; :something
;; :something
;; :something-else

steveb8n04:05:10

I like this lib and will definitely use it if it reaches prod quality. thanks for making it

steveb8n23:05:14

@U0BBFDED7 do you want issues logged yet? I have a couple of feature requests: 1. runtime query & 2. query/pull without ?table. just checking when you think bugs/feature requests are useful

ribelo08:05:03

Yes, please. Especially the feature request.

steveb8n08:05:13

great. thanks

ribelo09:05:56

Do grapql entities always start with two underscores?