Factorial Code Datastore
Factorial Code Datastore is a robust key-value storage system that is both simple and fast. It’s designed to empower your processes through accessible source code integration.
With Factorial Code Datastore, you can store and retrieve data within your processes and modules, facilitating information sharing across different executions. Unlock a myriad of possibilities, including:
- Preserving process states between executions (e.g., maintaining the last loaded date for use in subsequent executions of an ETL process).
- Efficient session management (e.g., performing a login only if your session has expired).
- Maintaining a shared team global state (e.g., tracking counters, execution usage, and more).
Manipulating Datastore values is accomplished through the following Factorial Code commands:
await fcode.datastore.set("key", "value");const value = await fcode.datastore.get("key");await fcode.datastore.del("key");// Get all keysconst allKeys = await fcode.datastore.keys();
// Get keys matching a pattern (e.g., all keys starting with "user:")const userKeys = await fcode.datastore.keys("user-*");fcode.datastore.set("key", "value")value = fcode.datastore.get("key")fcode.datastore.delete("key")# Get all keysall_keys = fcode.datastore.keys()
# Get keys matching a pattern (e.g., all keys starting with "user:")user_keys = fcode.datastore.keys("user-*")