$ZYSUFFIX() returns 128-bit hash as 22-character alphanumeric string
Final Release Note
The M function $ZYSU[FFIX]() returns a 128-bit MurmurHash3 of its string argument string rendered as a 22 character alphanumeric (i.e., 0-9, a-z, A-Z) sequence suitable for concatenation to an application identifier (e.g., "^%MyApp"
) to generate names for global variables, local variables, and routines that are unique for all practical purposes.
Note that (a) YottaDB supports names that are unique in the first 31 characters, and (b) the function may return different sequences for the same argument string on different platforms. [#391 (closed)]
Description
A 128-bit hash can be used to guarantee that for all practical purposes two byte sequences are different. Applications can use the functions described here to generate unique variable and routine names.
Draft Release Note
The M function $zysu[ffix](string)
implements the Octo C function int ydb_hash2name_s(ydb_buffer_t *name, uint128_t *hash)
. This function returns a 22 character alphanumeric (0-9, a-z, A-Z) name that can be concatenated to an application identifier (such as %ydbocto
) to generate names for global variables, local variables, and routines that are guaranteed for all practical purposes to be unique.
Note that (a) YottaDB supports names that are unique in the first 31 characters, and (b) the functions may return different names for the same hash on different platforms (e.g., with varying endian-ness). [#391 (closed)]