Collection Type ("M" Reference)

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

The Collection type is an unordered group of potentially duplicate values.

Operators

The unary postfix operator in the following table takes Collection as a left operand.

Operator Return

#

Integer

The binary operators in the following table take Collection as a left operand.

Operator Right Operand Return

>, <, <=, >=, ==, !=

Collection

Logical

where

Logical

Collection

select

Any

Collection

&, |, \

Collection

Collection

Functions

The functions in the following table are defined on all Collections.

Function Description

Count()

Returns the total number of elements in a collection.

Distinct()

Removes all duplicates in a collection.

Code Example

The following code shows the Employees field being declared as a Collection of Text types and receiving the values "Josh Barnhill" and "Andy Jacobs".

Employees : Text* {"Josh Barnhill", "Andy Jacobs"};