Fork me on GitHub
#keechma
<
2017-08-04
>
urbank09:08:30

@mihaelkonjevic Where would I run actions that should happen after a dataloader has loaded some data to the :target path?

mihaelkonjevic09:08:00

What do you need to do?

mihaelkonjevic09:08:30

I didn't have a need for a such feature

mihaelkonjevic09:08:24

So I'd like a real example to figure out what's the best approach

urbank09:08:07

I'm loading the data into a table. Then I want to put the ids of the table items somewhere in the database. I suppose that's what entity-db does automatically, but what if you're not using entity-db?

mihaelkonjevic09:08:49

The easiest would be to have a data-ids data source which depends on the data data source

mihaelkonjevic09:08:43

That way whenever the original data changes data-ids would be called and you can process it to extract the ids

mihaelkonjevic09:08:52

Datsource params fn received the data from all data sources it depends on. So you could just return the data from there and the loader fan could extract and store ids

urbank09:08:29

Ok, I'll try that. Thanks!

urbank09:08:12

@mihaelkonjevic Great, that works. By the way, I remember reading somewhere that you were going to give a talk on keechma. Has that happened yet? Is there a video?

mihaelkonjevic09:08:38

it’s in september on ClojuTRE in Finland

urbank14:08:42

@mihaelkonjevic Hm... I'm getting Missing dependencies :item for component :list Can't figure out why. Will try to make minimal example

mihaelkonjevic14:08:52

are you trying to get the “item” subscription without adding it into subscription-deps ?

urbank14:08:37

Nope, haven't introduced subscriptions at all. Just components-deps

mihaelkonjevic14:08:07

is the “item” component registered in the ui-system map?

urbank14:08:47

As far as I can tell, yes. It's the same keyword, and it's not nil if I inspect it.

mihaelkonjevic15:08:12

hm, yeah I’ll need the minimal example then 🙂

urbank15:08:51

@mihaelkonjevic pfff.... it was just a damn typo!

urbank15:08:37

I suppose that's a trade-off of somewhat substituting vars for keys in hash maps.

urbank20:08:57

@mihaelkonjevic So I'm playing around with the keechma source. The airity issue is specific to the toolbox library, correct? It doesn't seem to be an issue with a "vanilla" Controller

urbank21:08:59

Hm, so apparently

urbank21:08:03

[org.clojure/clojure "1.9.0-alpha15"] [org.clojure/clojurescript "1.9.229"] Are still okay? They're dependencies of the keechma-toolbox lib