settings-store: add existence scry

This commit is contained in:
Isaac Visintainer 2021-02-17 16:52:45 -08:00
parent 081c4579b2
commit 815c64b074

View File

@ -93,6 +93,18 @@
=/ entry=(unit val) (~(get by bucket) key) =/ entry=(unit val) (~(get by bucket) key)
?~ entry [~ ~] ?~ entry [~ ~]
``settings-data+!>(entry+u.entry) ``settings-data+!>(entry+u.entry)
::
[%x %has-bucket @ ~]
=* buc i.t.t.pax
=/ has-bucket=? (~(has by settings) buc)
``noun+!>(has-bucket)
::
[%x %has-entry @ @ ~]
=* buc i.t.t.pax
=* key i.t.t.t.pax
=/ =bucket (fall (~(get by settings) buc) ~)
=/ has-entry=? (~(has by bucket) key)
``noun+!>(has-entry)
== ==
:: ::
++ on-agent on-agent:def ++ on-agent on-agent:def