SemWeb.SelectResult

SemWeb : SemWeb Namespace
SelectResult Class

This class is used to hold the results of a call to Select.

public abstract class SelectResult : StatementSource, System.Collections.Generic.IEnumerable<SemWeb.Statement>

#### Remarks

See SemWeb.Store.Select(SemWeb.Statement) and SemWeb.Store.Select(SemWeb.SelectFilter) for examples.

## Members

See Also: Inherited members from object.

### Properties

Distinct [read-only] | bool . Gets whether this select result returns only distinct statments from Select calls.
StatementCount [read-only] | long . Gets the number of matching statements.

### Methods

| Load () : MemoryStore Loads all of the matching statements into memory and returns a MemoryStore containing the statements.
abstract | Select (StatementSink) Streams the result of this Select call to a StatementSink.
| ToArray () : Statement[] Loads all of the matching statements into memory and returns them as an array.

## Member Details

### Select Method

public abstract void Select (StatementSink sink)

Streams the result of this Select call to a StatementSink.

#### Parameters

sink
  The sink to receive the statements.

#### Remarks

If the statements have not yet been loaded into memory, this call will stream the result of the Select call to the sink without loading all of the statements into memory at once.

### Load Method

public MemoryStore Load ()

Loads all of the matching statements into memory and returns a MemoryStore containing the statements.

#### Returns

A MemoryStore containing the matching statements.

#### Remarks

Calling this method is not advised when the number of matching statements may be very large.

### StatementCount Property

public long StatementCount { get; }

Gets the number of matching statements.

#### Value

The number of matching statements.

#### Remarks

Upon accessing this property, all of the matching statements are loaded into memory as if through a call to SemWeb.SelectResult.Load().

### ToArray Method

public Statement[] ToArray ()

Loads all of the matching statements into memory and returns them as an array.

#### Returns

An array of matching statements.

#### Remarks

Calling this method is not advised when the number of matching statements may be very large.

### Distinct Property

public bool Distinct { get; }

Gets whether this select result returns only distinct statments from Select calls.

#### Value

True if any call to Select and its overloads yields only distinct statements (i.e. no duplicates).

#### Remarks

None.