Fork me on GitHub
#fulcro
<
2020-02-12
>
thosmos07:02:18

If a form has subforms and one is added creating a tempid entry in a root table and also in the parent’s subforms link list, and then the whole session is cancelled, pristine->entity* only removes the link from the parent’s list, but the item still remains in the root table. Is there an existing helper for getting rid of all the temp subform items from their root tables on cancel?

tony.kay15:02:48

Cleaning up stuff like that isn’t really an issue from any performance or memory perspective usually, but there are helpers in notmalized-state: https://cljdoc.org/d/com.fulcrologic/fulcro/3.1.8/api/com.fulcrologic.fulcro.algorithms.normalized-state#remove-entity

thosmos17:02:10

ah cool thanks!

michael zhou10:02:33

@tony.kay Fulcro and fulcro-rad is very awesome. Will there be a fulcro-rad-crux library?

🤞 8
tony.kay15:02:53

If someone writes it 😉 The adapters are quite small…The Datomic adapter, for example, is about 550 LOC at the moment, and won’t be getting much larger than that, and it supports sharding, auto-generated resolvers, connection mocking, and some testing utils. Most of the important stuff is done in layers above.

😮 4
mruzekw19:02:39

Do the auto-generated resolvers in RAD support CRUD operations? (assuming datomic)

currentoor19:02:11

if you use the datomic adapter

mruzekw19:02:21

What if someone was using another adapter for a SQL db?

currentoor20:02:35

i believe someone is writing a sql adapter, i would assume CRUD is supported

currentoor20:02:46

crud is one of the core features of rad after all

currentoor20:02:04

yes looks like it does

mruzekw20:02:23

fulcrologic / fulcro-rad-datomic > The current version only supports on-prem with a PostgreSQL store. There is nothing in the design that requires this, it has just not yet been generalized. Is this still the case? Meaning no Datomic Cloud support yet?

currentoor21:02:52

most likely meaning has not been tested with anything other than on-prem

currentoor21:02:14

i’d suggest reading through the source it’s only a couple hundred lines of code

currentoor21:02:49

see if there are any calls to d/entity (not supported in the client lib)

currentoor21:02:07

and i believe there are some other API differences but i don’t remember all of them

currentoor21:02:42

however despite all that i think it would be pretty straightforward to adapt this code to the client lib, i.e. cloud compatible

👍 4
mruzekw21:02:25

Sounds good, thanks