We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
May need to create custom lifecycle cljfx/cljfx#161
The text was updated successfully, but these errors were encountered:
Simply putting datalevin store atom in cljfx context seems to work... access it with fx/sub-ctx to do query:
fx/sub-ctx
(ns simpler (:require [datalevin.core :as dtlv] [cljfx.api :as fx] [clojure.core.cache :as cache])) (def *store (dtlv/get-conn "path" schema) (def *context (atom (fx/create-context {:dtlv *store} cache/lru-cache-factory))) (dtlv/listen! *store :ui (fn [_] (swap! *context fx/swap-context assoc :max-tx (:max-tx @*store)))) (defn q [ctx query-vector] (let [_ (fx/sub-val ctx :max-tx)] ; make sub depend on :max-tx to provoke rendering (dtlv/q query-vector @(fx/sub-val ctx :dtlv)))
Let's see how this goes...
Sorry, something went wrong.
Repo updated reflect this solution.
No branches or pull requests
May need to create custom lifecycle cljfx/cljfx#161
The text was updated successfully, but these errors were encountered: