Hacker News

Datalog Writeback Tool

by @Xmd5a

Datalog writebacks through derived columns. Any query. Any cell. And probably any datalog-based database too, it's just a client-side trick. Works well on this: {:find [?title ?director ?rating ?card ?shout] :where [[?m :movie/title ?title] [?m :movie/vote-average ?rating] [(str ?rating) ?rating-str] [(concat ?title ": ") ?title-colon] [(concat ?title-colon ?rating-str) ?card] [(lower ?title) ?lowered] [(concat ?lowered "!!!") ?decorated] [(upper ?decorated) ?shout] ;; joints [?cr :crew/job "Director"] [?cr :crew/movie ?m] [?cr :crew/person ?p] [?p :person/name ?director]]} You can edit a movie's ?title and ?rating through the ?card column for instance. It supports arithmetics too (to the extent that it's logically feasible of course).

Discover more builders

Builderlust is an endless, joyful scroll of real projects people are shipping right now. Get the app to keep finding your next spark of inspiration.

📱 Coming soon to iOS & AndroidOpen in the app