Support Datastores other than table/list -based data #4313
Replies: 4 comments
-
Can you give some examples of the kind of data you'd want to store here? One example of data I wouldn't like to support (at least not without significant thought) is global counters. |
Beta Was this translation helpful? Give feedback.
-
quick examples:
Once we eventually no longer require manual "execution" of pure user fns, the line between a parameterless pure user function and Global may end up being in UI only, if any. |
Beta Was this translation helpful? Give feedback.
-
So immutable global variables are planned, which solves a majority of this. There may be an argument to allow you to change them in the editor, such as a base url (they would still be immutable in the runtime, that is, not updatable from dark code). Though that's really just an optimization of the make-a-new-version+feature-flag+remove-old-version pattern. |
Beta Was this translation helpful? Give feedback.
-
Separately from immutable global variables, I think different kinds of datastore are useful. If we consider the current one to be a dict, then there's also value to
(as well as other variations that more closely resemble caches, or that are more performant due to not supporting querying). |
Beta Was this translation helpful? Give feedback.
-
I'd like to manage long-lived typed data in Dark data stores that don't always fit within the current metaphor of a DB table/list.
In my head, I call them "globals" - sort of like Secrets, but: not secret, I can mutate them, and they can be of any Dark type.
Right now you can live without this feature by writing a Function that returns the static data. I think it'd be worthwhile to have something separate. Maybe Secrets are a sub-part of Globals in implementation, long-term.
Beta Was this translation helpful? Give feedback.
All reactions