Fork me on GitHub
#datascript
<
2019-08-01
>
akond14:08:41

how do i remove an attribute+value from database? [[:db/add [:app/form id] :form/stage nil]] does not work because it does not accept nil as a value.

dpsutton14:08:42

[:db/retract entity-id attribute value]

akond14:08:31

i have to know what the value is?

ncg14:08:32

[[:db.fn/retractAttribute eid attribute]]

ncg14:08:04

There is also a built-in function to retract an entire entity, aptly named :db.fn/retractEntity

akond15:08:05

i want to keep the entity

akond15:08:32

just one attribute

ncg15:08:52

then it's the above :db.fn/retractAttribute