Skip to main content
Version: 11.2

$.udb(ds).realType()

note

This article is about the realType() function of the DataSourceContainer object.

$.udb(ds).realType()

Gets the real type of the first data source in the container. For most data sources this is the same value as returned by type(). For a virtual data source, however, type() returns 'Virtual', while realType() returns the type of the real data source that the virtual data source is connected to, which could e.g. be 'Table' instead.

Returns a data source type.

Syntax

$.udb( *ds* ).realType()

The required ds is a data source selector.

Examples

// only query child data sources that are backed by a real table
$.udb('EMP').children().forEach((child) => {
if (child.realType() !== 'Variable' && child.type() !== 'Virtual') {
child.executeQuery();
}
else {
console.log('%s is not backed by a real table (type: %s), skipping query', child.name(), child.realType());
}
});
$.udb('Virtual EMP').type();

Output:
'Virtual'

$.udb('Virtual EMP').realType();

Output:
'Table'