This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-20
Channels
- # announcements (1)
- # architecture (14)
- # asami (21)
- # babashka (1)
- # beginners (44)
- # biff (6)
- # calva (24)
- # clojure (16)
- # clojure-europe (12)
- # clojurescript (32)
- # cursive (23)
- # datascript (5)
- # honeysql (8)
- # hyperfiddle (1)
- # malli (1)
- # nextjournal (34)
- # nrepl (4)
- # off-topic (64)
- # re-frame (12)
- # reagent (1)
- # releases (2)
- # reveal (41)
- # shadow-cljs (137)
- # spacemacs (4)
- # xtdb (5)
I’m trying to use datascript from vanilla JS to read my Roam Research export EDN file. However, when I try to run a basic query it fails with Error: Cannot compare :block/uid to :node/title
. The exact same query works in Datascript in Clojurescript. Here’s the exact code: https://gist.github.com/saurabhsharan/7f65765713a7c96f3e60acd8987d61ba Any ideas? Thanks!
this looks like the same issue jlongster was running into in a thread above yours https://clojurians.slack.com/archives/C07V8N22C/p1641581106005500?thread_ts=1641578922.004100&cid=C07V8N22C
the gist of it is: jsedn.parse
converts keywords to strings, and datascript leaves them as strings. so in your query, you'll need to surround your attributes in quotes so that datascript knows to compare them as strings