Table of Contents

Class QueryDesign

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

Turns a QueryModel over a DataSourceCatalog into query text, and suggests the joins a table brings from the catalog's foreign keys. Identifiers are always bracketed with their ] doubled, and a literal value is quoted with its apostrophes doubled, so no name or value the author types becomes SQL; a value written @Name is a query parameter, which the dataset binds to a report parameter.

public static class QueryDesign
Inheritance
QueryDesign
Inherited Members

Methods

AddTable(QueryModel, DataSourceCatalog, string)

Adds a table, and the join from the catalog's foreign keys that links it to a table already in the query.

Parameters(QueryModel)

The query parameters the model's filters use (@Region), in first-use order.

Quote(string)

A bracketed identifier: [Order Details], with ] doubled.

RemoveTable(QueryModel, string)

Removes a table with its columns, joins, filters and sort keys.

ToCommandText(QueryModel, DataSourceCatalog)

The query text: Transact-SQL for a database, the file name for a file source.

Validate(QueryModel, DataSourceCatalog)

What is wrong with the model for its dialect, or null when it makes a query.