samuk190 / localbase

A Firebase-Style Database ... Offline!
636 stars 84 forks source link

Check if document or key/field exists #66

Closed WriterStat closed 2 years ago

WriterStat commented 2 years ago

Hi! I'm new to indexdb and localbase, trying it out. So thanks for some great kit.

I have an existing vanilla javascript app.

How does someone check if a document or key/field exists? I want to add one if there isn't one, but don't want to write over an existing collection, document, or key/field if it exists.

get() seems to resolve true even if there isn't a document or key/field

Thanks!

Is there a different way to look at this? Do I need to reshape my thinking for this? Much thanks.

WriterStat commented 2 years ago

Closed due to no author response. Looked promising.