Json-db-node-red keeping object that wasn't stored persistently

Yes - I cant delete topics.

// Deleting data
db.delete("/test1");

is not implemented in the Node.

Here are some examples to directly construct the JsonDB object, but even if I do not use the module with path - I can't create the object.

For me - it looks like I can't create any object with this library.

It seems that I have a general problem to create objects with new. I tried it with another library and I got the same error.

Adding this parameter:

functionExternalModules: true

in settings.js makes no difference.

I guess I have a general problem.

This seems to have gone rather off topic. For @knowledgeshark i think you would do best to look at the local context stores as previously mentioned as they are stores for json objects. Maybe not quite as flexible as a database but fine for simple set and get (and delete)

Thanks @dceejay I'll look into it. The json-db-node-red is working very nicely, after that slight hiccup where I can make a copy before modifying.

As for the @mickym2 -- I can't find the node-json-db you mention when searching the pallets.

I'm running node-red 2.0.5. I tried updating to get the MQTT dynamic config but having a slight issue. Maybe node-json-db is in the latest?

thanks.

The nodes json-db-node-red are based on node-json-db.

If you look in this library, then you will see that delete function from this library is not implemented in the nodes. Therefore my idea was to work directly with this library.

thanks, will look into that next. I though the node "pallet" should show all the valid installable nodes?

As for deleting .. the best I can offer is to update the "key" to something unused, so it can't be found later. Maybe that would work?
thanks.

May be, there is a misunderstanding - the nodes work and are stable.

I am missing in the nodes the delete function, which is offered by the underlying library. Best would be the in the Database In Node - would accept a message like msg.delete with a value of the path to delete the topic, so as implemented in the library:

// Deleting data
db.delete("/test1");

so if the Database In Node would accept a msg.delete = "/test1" this would supplement the node with the missing functionality.

However why I can't create objects from an external library is still open - but I will create a new thread for this problem.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.