$.udb(ds).extraKeys()
note
This article is about the extraKeys() function of the DataSourceContainer object.
$.udb(ds).extraKeys()
Gets the extra key columns of the first data source in the container. Extra keys are columns that are used as keys in a relation to a child or lookup data source, but that are not part of that data source's own key definition.
Returns a Map object, where each entry maps an extra key column name to its alias.
Syntax
$.udb( *ds* ).extraKeys()
The required ds parameter is a data source selector.
Example
// combine the data source's own keys with its extra keys to get every column
// that is needed to uniquely identify and relate one of its records
let allKeyCols = new Map([...$.udb('EMP').keys(), ...$.udb('EMP').extraKeys()]);
allKeyCols.forEach((alias, name) => {
console.log('%s (alias: %s) is required to reference this data source', name, alias);
});