Logo Deedle

DelayedSeries Type

This type exposes a single static method `DelayedSeries.Create` that can be used for constructing data series (of type Series<K, V>) with lazily loaded data. You can use this functionality to create series that represents e.g. an entire price history in a database, but only loads data that are actually needed. For more information see the [lazy data loading tutorial](../lazysource.html).

Example

Assuming we have a function generate lo hi that generates data in the specified DateTime range, we can create lazy series as follows:

 let ls = DelayedSeries.Create(min, max, fun (lo, lob) (hi, hib) ->
   async {
     printfn "Query: %A - %A" (lo, lob) (hi, hib)
     return generate lo hi })
val ls: obj
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val async: AsyncBuilder
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
The arguments min and max specify the complete range of the series. The function passed to Create is called with minimal and maximal required key (lo and hi) and with two values that specify boundary behaviour.

Static members

Static member Description

DelayedSeries.FromIndexVectorLoader(scheme, vectorBuilder, indexBuilder, min, max, loader)

Full Usage: DelayedSeries.FromIndexVectorLoader(scheme, vectorBuilder, indexBuilder, min, max, loader)

Parameters:
Returns: Series<'K, 'V>
Type parameters: 'K, 'V (requires equality)
scheme : IAddressingScheme
vectorBuilder : IVectorBuilder
indexBuilder : IIndexBuilder
min : 'K
max : 'K
loader : 'K * BoundaryBehavior -> 'K * BoundaryBehavior -> Async<IIndex<'K> * IVector<'V>>
Returns: Series<'K, 'V>

DelayedSeries.FromIndexVectorLoader(scheme, vectorBuilder, indexBuilder, min, max, loader)

Full Usage: DelayedSeries.FromIndexVectorLoader(scheme, vectorBuilder, indexBuilder, min, max, loader)

Parameters:
Returns: Series<'K, 'V>
Type parameters: 'K, 'V (requires equality)
scheme : IAddressingScheme
vectorBuilder : IVectorBuilder
indexBuilder : IIndexBuilder
min : 'K
max : 'K
loader : Func<'K, BoundaryBehavior, 'K, BoundaryBehavior, Task<IIndex<'K> * IVector<'V>>>
Returns: Series<'K, 'V>

DelayedSeries.FromValueLoader(min, max, loader)

Full Usage: DelayedSeries.FromValueLoader(min, max, loader)

Parameters:
    min : 'K - The smallest key that should be present in the created series.
    max : 'K - The greatests key that should be present in the created series.
    loader : 'K * BoundaryBehavior -> 'K * BoundaryBehavior -> Async<KeyValuePair<'K, 'V> seq> - A function which returns an asynchronous workflow that loads the data in a specified range. The function is called with two tuples consisting of key and `BoundaryBehavior` values. The keys specify lower and upper boundary and `BoundaryBehavior` values can be either `Inclusive` or `Exclusive`.

Returns: Series<'K, 'V>
Type parameters: 'K, 'V (requires comparison)

An F#-friendly function that creates lazily loaded series. The method requires the overall range of the series (smallest and greatest key) and a function that loads the data. The function is called with two tuples that specify lower and upper boundary. It returns an asynchronous workflow that produces the data.

For more information see the [lazy data loading tutorial](../lazysource.html).

min : 'K

The smallest key that should be present in the created series.

max : 'K

The greatests key that should be present in the created series.

loader : 'K * BoundaryBehavior -> 'K * BoundaryBehavior -> Async<KeyValuePair<'K, 'V> seq>

A function which returns an asynchronous workflow that loads the data in a specified range. The function is called with two tuples consisting of key and `BoundaryBehavior` values. The keys specify lower and upper boundary and `BoundaryBehavior` values can be either `Inclusive` or `Exclusive`.

Returns: Series<'K, 'V>

DelayedSeries.FromValueLoader(min, max, loader)

Full Usage: DelayedSeries.FromValueLoader(min, max, loader)

Parameters:
    min : 'K - The smallest key that should be present in the created series.
    max : 'K - The greatests key that should be present in the created series.
    loader : Func<'K, BoundaryBehavior, 'K, BoundaryBehavior, Task<KeyValuePair<'K, 'V> seq>> - A delegate which returns a task that loads the data in a specified range. The delegate is called with four arguments specifying the minimal and maximal key and two `BoundaryBehavior` values specifying whether the low and high ranges are inclusive or exclusive.

Returns: Series<'K, 'V>
Type parameters: 'K, 'V (requires comparison)

A C#-friendly function that creates lazily loaded series. The method requires the overall range of the series (smallest and greatest key) and a function that loads the data. In this overload, the function is a `Func` delegate taking information about the requested range and returning Task<T> that produces the data.

For more information see the [lazy data loading tutorial](../lazysource.html). The operation calls `loader` (and so creates the tasks) on the thread that is requesting the result.

min : 'K

The smallest key that should be present in the created series.

max : 'K

The greatests key that should be present in the created series.

loader : Func<'K, BoundaryBehavior, 'K, BoundaryBehavior, Task<KeyValuePair<'K, 'V> seq>>

A delegate which returns a task that loads the data in a specified range. The delegate is called with four arguments specifying the minimal and maximal key and two `BoundaryBehavior` values specifying whether the low and high ranges are inclusive or exclusive.

Returns: Series<'K, 'V>

Type something to start searching.