Constructor
new SqlFieldsQuery(sql)
Public constructor.
Requires SQL query string to be specified. Other SQL Fields query settings have the following defaults:
SQL Fields Query setting : Default value Local query flag : false Cursor page size : 1024 Query arguments : not specified Distributed joins flag : false Replicated only flag : false Timeout : 0 (disabled) Schema for the query : not specified Max rows : -1 Statement type : STATEMENT_TYPE.ANY Enforce join order flag : false Collocated flag : false Lazy query execution flag : false Include field names flag : falseEvery setting may be changed using set methods.
Parameters:
Name | Type | Description |
---|---|---|
sql |
string | SQL query string. |
Extends
Members
(static, readonly) STATEMENT_TYPE
Statement type of SQL Fields query.
Properties:
Name | Type | Description |
---|---|---|
ANY |
0 |
|
SELECT |
1 |
|
UPDATE |
2 |
Methods
setArgs(…args) → {SqlQuery}
Set query arguments.
Type of any argument may be specified using setArgTypes() method. If type of an argument is not specified then during operations the Ignite client will try to make automatic mapping between JavaScript types and Ignite object types - according to the mapping table defined in the description of the ObjectType class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
* |
<repeatable> |
Query arguments. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setArgTypes(…argTypes) → {SqlQuery}
Specifies types of query arguments.
Query arguments itself are set using setArgs() method. By default, a type of every argument is not specified that means during operations the Ignite client will try to make automatic mapping between JavaScript types and Ignite object types - according to the mapping table defined in the description of the ObjectType class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
argTypes |
ObjectType.PRIMITIVE_TYPE | CompositeType |
<repeatable> |
types of Query arguments. The order of types must follow the order of arguments in the setArgs() method. A type of every argument can be:
|
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setCollocated(collocated) → {SqlFieldsQuery}
Set collocated flag.
Parameters:
Name | Type | Description |
---|---|---|
collocated |
boolean | collocated flag: true or false. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setDistributedJoins(distributedJoins) → {SqlQuery}
Set distributed joins flag.
Parameters:
Name | Type | Description |
---|---|---|
distributedJoins |
boolean | distributed joins flag: true or false. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setEnforceJoinOrder(enforceJoinOrder) → {SqlFieldsQuery}
Set enforce join order flag.
Parameters:
Name | Type | Description |
---|---|---|
enforceJoinOrder |
boolean | enforce join order flag: true or false. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setIncludeFieldNames(includeFieldNames) → {SqlFieldsQuery}
Set include field names flag.
Parameters:
Name | Type | Description |
---|---|---|
includeFieldNames |
boolean | include field names flag: true or false. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setLazy(lazy) → {SqlFieldsQuery}
Set lazy query execution flag.
Parameters:
Name | Type | Description |
---|---|---|
lazy |
boolean | lazy query execution flag: true or false. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setLocal(local) → {Query}
Set local query flag.
Parameters:
Name | Type | Description |
---|---|---|
local |
boolean | local query flag: true or false. |
- Inherited From:
- Source:
Returns:
- the same instance of the Query.
- Type
- Query
setMaxRows(maxRows) → {SqlFieldsQuery}
Set max rows.
Parameters:
Name | Type | Description |
---|---|---|
maxRows |
number | max rows. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setPageSize(pageSize) → {Query}
Set Cursor page size.
Parameters:
Name | Type | Description |
---|---|---|
pageSize |
number | cursor page size. |
- Inherited From:
- Source:
Returns:
- the same instance of the Query.
- Type
- Query
setReplicatedOnly(replicatedOnly) → {SqlQuery}
Set replicated only flag.
Parameters:
Name | Type | Description |
---|---|---|
replicatedOnly |
boolean | replicated only flag: true or false. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setSchema(schema) → {SqlFieldsQuery}
Set schema for the query.
Parameters:
Name | Type | Description |
---|---|---|
schema |
string | schema for the query. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setSql(sql) → {SqlQuery}
Set SQL query string.
Parameters:
Name | Type | Description |
---|---|---|
sql |
string | SQL query string. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setStatementType(type) → {SqlFieldsQuery}
Set statement type.
Parameters:
Name | Type | Description |
---|---|---|
type |
SqlFieldsQuery.STATEMENT_TYPE | statement type. |
Returns:
- the same instance of the SqlFieldsQuery.
- Type
- SqlFieldsQuery
setTimeout(timeout) → {SqlQuery}
Set timeout.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | timeout value in milliseconds. Must be non-negative. Zero value disables timeout. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery
setType(type) → {SqlQuery}
Set name of a type or SQL table.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | name of a type or SQL table. |
- Inherited From:
- Source:
Returns:
- the same instance of the SqlQuery.
- Type
- SqlQuery