TechTalk Genome v4.2

Set<T>.Select<S> Method (Boolean, String, Object[])

Returns a Set<T> populated by evaluating the specified OQL expression on the elements of the source Set<T>.

public Set<S> Select<S>(
   bool distinct,
   string select,
   params object[] parameters
);

Type Parameters

S

The element type of the resulting set. The type of the scalar or persistent object returned by the select should be assignable to S type.

Parameters

distinct

A bool value specifying if the destination Set<T> should only contain distinct elements.

If true the destination Set<T> contains only distinct values of select; otherwise the number of elements returned in the destination Set<T> is equal to the number of elements in the source Set<T>. In any case select is evaluated for all elements in the source Set<T>.

select

An OQL expression that is evaluated for each element of the source Set<T>. The expression may contain zero or more literal parameter references and it can refer to the candidate element of the source Set<T> using the this keyword. The expression must return a scalar or persistent object of a type assignable to S.

parameters
An array of zero or more objects that can be used as literal argument values in select.

Return Value

A Set<T> that contains the result of evaluating select for each element of the source Set<T>. The resulting Set<T> contains distinct elements if distinct is true.

Exceptions

Exception TypeCondition
OqlParserExceptionselect does not denote a valid OQL expression.
SqlDomException

select is not applicable to the element type of the source Set<T>.

or

select can not be translated to the target SQL language.

or

The result type of select is not scalar or persistent in the given DataDomainSchema.

SchemaExceptionselect contains expressions or features that cannot be translated with the given DataDomainSchema.

Requirements

Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.11.59

Editions: Professional, Evaluation, Express

See Also

Set<T> Class | TechTalk.Genome Namespace | Set<T>.Select<S> Overload List | Projection