[SR-Users] about $sht(htable=>key) htable name

Juha Heinanen jh at tutpro.com
Tue Oct 13 13:44:17 CEST 2020


Daniel-Constantin Mierla writes:

> In the code is possible to lookup the hash table at runtime, being also
> done by some of the htable cfg functions. It will require some new code
> to evaluate the name expression every time at at runtime, then parse and
> lookup the hash table structure...

A use case where it would be convenient to have htable name in a
variable is when there is two hash tables, one of which is active while
the other waits new content to be loaded from database.  When done,
roles of the two hash tables are changed.

So instead of testing, which hash table is currently active and then use
its string name as htable name, it would be simpler to use a var where
the name of currently active table is stored.

-- Juha



More information about the sr-users mailing list