Interface IQueryConfigurator
Fluent interface for configuring queries.
Namespace: Gossip.Connection.Fluent
Assembly: Gossip.dll
Syntax
public interface IQueryConfigurator
Methods
| Improve this Doc View SourceBuild()
Build a IQueryExecutor from the configured query.
Declaration
IQueryExecutor Build()
Returns
| Type | Description |
|---|---|
| IQueryExecutor | A configured IQueryExecutor. |
BulkInsert<T>(IEnumerable<T>)
Build a IBulkInsertConfigurator<T> from the configured query.
Declaration
IBulkInsertConfigurator<T> BulkInsert<T>(IEnumerable<T> data)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | data | The data to bulk insert. |
Returns
| Type | Description |
|---|---|
| IBulkInsertConfigurator<T> | A configured IBulkInsertConfigurator<T> |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to bulk insert. |
Unbuffered()
Configure the query to execute unbuffered. If you use this, you must enumerate the results before closing the connection.
Declaration
IQueryConfigurator Unbuffered()
Returns
| Type | Description |
|---|---|
| IQueryConfigurator |
WithCancellationToken(CancellationToken)
Provide a cancellation token to cooperatively handle task cancellation.
Declaration
IQueryConfigurator WithCancellationToken(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| IQueryConfigurator |
WithParameters(Object)
Configure the parameters for the query.
Declaration
IQueryConfigurator WithParameters(object parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | parameters | The parameters to use with the query. |
Returns
| Type | Description |
|---|---|
| IQueryConfigurator |
WithQuery(String)
Configure the query.
Declaration
IQueryConfigurator WithQuery(string query)
Parameters
| Type | Name | Description |
|---|---|---|
| String | query | The SQL query to execute. |
Returns
| Type | Description |
|---|---|
| IQueryConfigurator |
WithTimeoutInSeconds(Int32)
Specify a query timeout in seconds.
Declaration
IQueryConfigurator WithTimeoutInSeconds(int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | timeout | The query timeout, in seconds. |
Returns
| Type | Description |
|---|---|
| IQueryConfigurator |