Search Results for

Show / Hide Table of Contents

# Class SqlQuery

SQL Query.

##### Inheritance

System.Object
QueryBase
SqlQuery

##### Inherited Members

QueryBase.DefaultPageSize
QueryBase.Local
QueryBase.PageSize

###### Namespace: Apache.Ignite.Core.Cache.Query

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public class SqlQuery : QueryBase, IQueryBaseInternal

### Constructors

#### SqlQuery(String, String, Boolean, Object[])

Constructor.

##### Declaration

    public SqlQuery(string queryType, string sql, bool local, params object[] args)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | queryType | Type.
System.String | sql | SQL.
System.Boolean | local | Whether query should be executed locally.
System.Object[] | args | Arguments.

#### SqlQuery(String, String, Object[])

Constructor.

##### Declaration

    public SqlQuery(string queryType, string sql, params object[] args)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | queryType | Type.
System.String | sql | SQL.
System.Object[] | args | Arguments.

#### SqlQuery(Type, String, Boolean, Object[])

Constructor.

##### Declaration

    public SqlQuery(Type queryType, string sql, bool local, params object[] args)

##### Parameters

Type | Name | Description
--- | --- | ---
Type | queryType | Type.
System.String | sql | SQL.
System.Boolean | local | Whether query should be executed locally.
System.Object[] | args | Arguments.

#### SqlQuery(Type, String, Object[])

Constructor.

##### Declaration

    public SqlQuery(Type queryType, string sql, params object[] args)

##### Parameters

Type | Name | Description
--- | --- | ---
Type | queryType | Type.
System.String | sql | SQL.
System.Object[] | args | Arguments.

### Properties

#### Arguments

Arguments.

##### Declaration

    public object[] Arguments { get; set; }

##### Property Value

Type | Description
--- | ---
System.Object[] |

#### EnableDistributedJoins

Gets or sets a value indicating whether distributed joins should be enabled for this query.

When disabled, join results will only contain colocated data (joins work locally). When enabled, joins work as expected, no matter how the data is distributed.

##### Declaration

    public bool EnableDistributedJoins { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean | `true` if enable distributed joins should be enabled; otherwise, `false`.

#### QueryType

Type.

##### Declaration

    public string QueryType { get; set; }

##### Property Value

Type | Description
--- | ---
System.String |

#### ReplicatedOnly

Gets or sets a value indicating whether this query contains only replicated tables. This is a hint for potentially more effective execution.

##### Declaration

    public bool ReplicatedOnly { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### Sql

SQL.

##### Declaration

    public string Sql { get; set; }

##### Property Value

Type | Description
--- | ---
System.String |

#### Timeout

Gets or sets the query timeout. Query will be automatically cancelled if the execution timeout is exceeded. Default is , which means no timeout.

##### Declaration

    public TimeSpan Timeout { get; set; }

##### Property Value

Type | Description
--- | ---
TimeSpan |

### Methods

#### ToString()

Returns a that represents this instance.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | A that represents this instance.