Skip to main content
Version: 11.2

$.udb(ds).isDistinct()

note

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

$.udb(ds).isDistinct()

Detects whether the SELECT output list of the first data source in the container contains the DISTINCT operator, or not.

Returns a boolean.

Syntax

$.udb( *ds* ).isDistinct()

The required ds is a data source selector.

Example

// a DISTINCT query suppresses duplicate rows, so its row count may not
// correspond 1-to-1 with the underlying table's records
let dsc = $.udb('EMP');

if (dsc.isDistinct()) {
console.log('%s uses a DISTINCT query; its %d rows are duplicate-suppressed values', dsc.name(), dsc.rowCount());
}