Open MalteJanz opened 2 months ago
To allow lookup of entity IDs like:
Make it generic and allow the script to call something like
let currency_id = lookup("currency", "isoCode", "EUR");
And that would do an API search-ids request and return the ID or run into an error / panic.
Cons of this approach:
Prefetch some common lookup values at startup and store them in a HashMap in memory. Then the script would still be fast
HashMap
let currency_id = lookup_currency("EUR");
To allow lookup of entity IDs like:
Option A
Make it generic and allow the script to call something like
And that would do an API search-ids request and return the ID or run into an error / panic.
Cons of this approach:
Option B
Prefetch some common lookup values at startup and store them in a
HashMap
in memory. Then the script would still be fastCons of this approach: