Hi Pr,
Given that any RuntimeCollection related operations simply take a string identifier for the collection in question, these can be stored in a module as const strings if necessary. This would allow you to maintain a reference to said collections shortcodes if you would prefer that over hardcoding strings in your script.
Best Regards, Patrick.
Pr
Hi,
I'd like to be able to create a module that would contains all the collection names. I would then like to be able to assign the variable from the module in the cloud code event.
For example:
Spark.runtimeCollection(variableNameFromModule).remove({ "_id" : { "$oid" : itemsToRemove.next()._id.$oid }});
Is it possible?
I've seen that we can use function and I already do that, but I was wondering the syntax for the variable. It could also be like an enum.
Thanks!