Logic Machine Forum
Accessing LM Storage key list ? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Accessing LM Storage key list ? (/showthread.php?tid=2530)



Accessing LM Storage key list ? - olivier - 19.03.2020

Hi,

would be possible to access to the list of item's keys stored in LM storage ?
In order to find the right one I am looking for


(Documentation show only storage.get & storage.set command)

Best regards


RE: Accessing LM Storage key list ? - admin - 19.03.2020

Have you tried storage viewer app from the store?


RE: Accessing LM Storage key list ? - olivier - 20.03.2020

(19.03.2020, 17:14)admin Wrote: Have you tried storage viewer app from the store?

Hi,

yes I can do it manually, but I need to parse & search a specific name pattern within all Storage Key via scripting

Do you have any tips to do it ?

Best regards


RE: Accessing LM Storage key list ? - admin - 20.03.2020

You can use either:
storage.all() - returns a table will all storage values in key = value format
storage.keys() - returns a table (array-like) with all storage keys, this will also include other storage server keys like mosaic which uses different format so it cannot be read directly by using storage functions


RE: Accessing LM Storage key list ? - olivier - 20.03.2020

perfect thank you !!

[TOPIC CLOSED]


RE: Accessing LM Storage key list ? - olivier - 26.03.2020

Hi,

a last question, do you have a command to clean / remove all items at once ?
(like storage.removeAllKeys())

best regards


RE: Accessing LM Storage key list ? - admin - 26.03.2020

Use storage.clear()


RE: Accessing LM Storage key list ? - olivier - 30.03.2020

Thank you !!

those command are not visible in the helper tab of the script editor,
is these a place where to get / find all the available command in an exhaustive manner ?


RE: Accessing LM Storage key list ? - admin - 30.03.2020

Only widely-used functions are documented. Most of our documentation can be found here: https://openrb.com/docs/