Table of Contents

Class DataSourceProvider

Namespace
ReportWright.Data
Assembly
ReportWright.Data.Abstractions.dll

Connects to one kind of data source: tests the connection, discovers a dataset's fields, and runs a dataset's query into a DocWright.Reporting.Data.ReportDataReader. Execution itself stays DocWright's seam — the DataSourceRouter is the DocWright.Reporting.Data.ReportDataProvider the engine sees, and it dispatches here by Kind.

public abstract class DataSourceProvider
Inheritance
DataSourceProvider
Derived
Inherited Members

Remarks

Synchronous on purpose: the engine's seam is synchronous and runs on the thread processing the report. A provider over an asynchronous client uses its synchronous entry points.

A provider receives the limits in DataSourceExecutionOptions and should push them down where the source can enforce them (a command timeout, a TOP); the router wraps every reader in a guard that enforces them regardless, so a provider that cannot is still safe.

An abstract class, for the reason DocWright's seams give: members can be added later without breaking a provider; an interface on netstandard2.0 cannot grow.

Constructors

DataSourceProvider()

Initializes the base class.

Properties

Kind

Gets the kind this provider serves, matched to Kind ignoring case.

Methods

DescribeCatalog(ResolvedDataSource, DataSourceExecutionOptions, CancellationToken)

Describes the tables, columns and relationships a source offers, for the designer's query designer: metadata only, at most MaxTables tables. A provider that cannot describe its source returns null (the default), and the designer offers the query text alone.

DiscoverSchema(ResolvedDataSource, ReportDataQuery, DataSourceExecutionOptions, CancellationToken)

Discovers the fields a dataset's query yields, without reading its rows where the source allows.

Execute(ResolvedDataSource, ReportDataQuery, DataSourceExecutionOptions, CancellationToken)

Runs a dataset's query.

Test(ResolvedDataSource, CancellationToken)

Tests that the source can be reached, without running a dataset.